projects
/
mirror
/
dsa-nagios.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
partch is a porterbox
[mirror/dsa-nagios.git]
/
dsa-nagios-checks
/
checks
/
dsa-check-raid-aacraid
diff --git
a/dsa-nagios-checks/checks/dsa-check-raid-aacraid
b/dsa-nagios-checks/checks/dsa-check-raid-aacraid
index
0b82c47
..
3e7375b
100755
(executable)
--- a/
dsa-nagios-checks/checks/dsa-check-raid-aacraid
+++ b/
dsa-nagios-checks/checks/dsa-check-raid-aacraid
@@
-59,7
+59,7
@@
sub record($) {
}
# arcconf puts crap into a $PWD/UcliEvt.log file.
}
# arcconf puts crap into a $PWD/UcliEvt.log file.
-my $dir = tempdir( "check-aacraid-XXXXXXX", CLEANUP => 1 );
+my $dir = tempdir( "
/tmp/
check-aacraid-XXXXXXX", CLEANUP => 1 );
chdir ($dir) or die ("Cannot chdir $dir: $!\n");
my $ctrl = 1;
chdir ($dir) or die ("Cannot chdir $dir: $!\n");
my $ctrl = 1;
@@
-121,7
+121,7
@@
while ($ctrl <= $numcontrollers) {
my $status = $1;
if ($status eq 'Not Installed') {
next;
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';
record('WARNING');
};
push @{$status{$status}}, 'Battery';
@@
-136,5
+136,12
@@
while ($ctrl <= $numcontrollers) {
$ctrl++;
};
$ctrl++;
};
+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};
print "$EXITCODE: ", join(" --- ", @resultstr), "\n";
exit $CODE{$EXITCODE};