projects
/
mirror
/
dsa-nagios.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7749ed6
)
oops, catch exec failure
author
Stephen Gran
<steve@lobefin.net>
Sat, 30 Jul 2011 12:40:05 +0000
(13:40 +0100)
committer
Stephen Gran
<steve@lobefin.net>
Sat, 30 Jul 2011 12:40:05 +0000
(13:40 +0100)
Signed-off-by: Stephen Gran <steve@lobefin.net>
dsa-nagios-checks/checks/dsa-check-raid-megactl
patch
|
blob
|
history
diff --git
a/dsa-nagios-checks/checks/dsa-check-raid-megactl
b/dsa-nagios-checks/checks/dsa-check-raid-megactl
index
ae7a78c
..
da6a6f2
100755
(executable)
--- a/
dsa-nagios-checks/checks/dsa-check-raid-megactl
+++ b/
dsa-nagios-checks/checks/dsa-check-raid-megactl
@@
-10,6
+10,10
@@
my @ok;
my @cmd = ('sudo', 'megactl', '-Hv', '2>&1');
my @output = `@cmd`;
+if ($? != 0) {
+ print "WARNING: Exec failed!\n";
+ exit 2;
+}
for my $line (@output) {
if ($line =~ /^(\w+)\s+/) {