1
0
mirror of https://github.com/opinkerfi/nagios-plugins.git synced 2024-11-25 03:43:46 +01:00

Issue 56, temporary fix for selinux and disk checks

This commit is contained in:
Tomas Edwardsson 2012-05-10 11:17:49 +00:00
parent 2c23f04ffa
commit 6f5041d8cd

View File

@ -207,16 +207,17 @@ if($opt_H ne "localhost" and $opt_H ne "127.0.0.1") {
# Envoi commande et renseignement Hashage %disks # Envoi commande et renseignement Hashage %disks
my @output = `$cmd`; my @output = `$cmd`;
my $ret = $?; my $ret = $?;
$ret >>= 8;
if ($ret == -1) { if ($ret == -1) {
print "Could not find " . (split(' ', $cmd))[0] . "\n"; print "Could not find " . (split(' ', $cmd))[0] . "\n";
exit $EXIT_CODES{'UNKNOWN'}; exit $EXIT_CODES{'UNKNOWN'};
} }
$ret >>= 8;
# 2010/02/25 palli@ok.is : Check if $cmd ran successfully # 2010/02/25 palli@ok.is : Check if $cmd ran successfully
if ($ret > 0) { if ($ret > 1) {
print "Failed to execute $cmd: " . join("\n", @output) . "\n"; print "Failed to execute $cmd: " . join("\n", @output) . "\n";
exit $EXIT_CODES{'UNKNOWN'} ; exit $EXIT_CODES{'UNKNOWN'} ;
} }