Declar variable in the correct scope for hba mode detection

tags/zabbix-agent-addons-0.2.108-1
Daniel Berteaud 5 years ago
parent 0135771c7a
commit a38b7ab4b2
  1. 4
      zabbix_scripts/check_raid_megaraid_sudo

@ -128,9 +128,9 @@ ADAPTER: for ( my $adp = 0; $adp < $adapters; $adp++ ) {
open (CFGDSPLY, "$megacli -CfgDsply -a$adp -NoLog |") open (CFGDSPLY, "$megacli -CfgDsply -a$adp -NoLog |")
|| die "error: Could not execute $megacli -CfgDsply -a$adp -NoLog"; || die "error: Could not execute $megacli -CfgDsply -a$adp -NoLog";
my $hba = 0;
my $failgrouplist = 0;
while (<CFGDSPLY>) { while (<CFGDSPLY>) {
my $hba = 0;
my $failgrouplist = 0;
if ( m/Failed to get Disk Group list/ ) { if ( m/Failed to get Disk Group list/ ) {
$failgrouplist = 1; $failgrouplist = 1;
} }

Loading…
Cancel
Save