From 682ad04b9e6a5ae7024b4184969c8aab7a5b66a5 Mon Sep 17 00:00:00 2001 From: Tomas Edwardsson Date: Thu, 10 May 2012 11:17:49 +0000 Subject: [PATCH] Issue #56, temporary fix for selinux and disk checks --- check_disks.pl/check_disks.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/check_disks.pl/check_disks.pl b/check_disks.pl/check_disks.pl index f6e3753..6c2f3a1 100755 --- a/check_disks.pl/check_disks.pl +++ b/check_disks.pl/check_disks.pl @@ -207,16 +207,17 @@ if($opt_H ne "localhost" and $opt_H ne "127.0.0.1") { # Envoi commande et renseignement Hashage %disks my @output = `$cmd`; + my $ret = $?; +$ret >>= 8; if ($ret == -1) { print "Could not find " . (split(' ', $cmd))[0] . "\n"; exit $EXIT_CODES{'UNKNOWN'}; } -$ret >>= 8; # 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"; exit $EXIT_CODES{'UNKNOWN'} ; }