X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=dsa-nagios-checks%2Fchecks%2Fdsa-check-raid-aacraid;h=3e7375be4349cd412778457debdc6c495ac9ade7;hb=10245f35c145c9620420b92497ce8f25725925cf;hp=40e9a25e9504dd42bdf4f1fb4beadd088c42a68b;hpb=db2daaa923923feb69ef5fb767a00fa6d340cf9e;p=mirror%2Fdsa-nagios.git diff --git a/dsa-nagios-checks/checks/dsa-check-raid-aacraid b/dsa-nagios-checks/checks/dsa-check-raid-aacraid index 40e9a25..3e7375b 100755 --- a/dsa-nagios-checks/checks/dsa-check-raid-aacraid +++ b/dsa-nagios-checks/checks/dsa-check-raid-aacraid @@ -121,7 +121,7 @@ while ($ctrl <= $numcontrollers) { my $status = $1; if ($status eq 'Not Installed') { next; - } elsif ($status ne 'Optimal') { + } elsif ($status ne 'Optimal' && $status ne 'ZMM Optimal') { record('WARNING'); }; push @{$status{$status}}, 'Battery'; @@ -139,5 +139,9 @@ while ($ctrl <= $numcontrollers) { if ( -e 'UcliEvt.log' ) { unlink('UcliEvt.log') or die ("Cannot unlink UcliEvt.log: $!\n"); } + +# Need to chdir out of tempdir in order to rm it in new perl +chdir ('/') or die ("Cannot chdir /: $!\n"); + print "$EXITCODE: ", join(" --- ", @resultstr), "\n"; exit $CODE{$EXITCODE};