From 4f2fd189443ab63181c9c16d7716004f24234c8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georg=20Sch=C3=B6nberger?= Date: Fri, 28 Feb 2014 15:54:48 +0100 Subject: [PATCH] Fix command status checking --- check_lsi_raid | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/check_lsi_raid b/check_lsi_raid index 9a82093..3865335 100755 --- a/check_lsi_raid +++ b/check_lsi_raid @@ -128,11 +128,15 @@ sub displayVersion { sub checkCommandStatus{ my @output = @{(shift)}; foreach my $line (@output){ - if(($line =~ /^Status/) && ($line eq "Status = Success\n")){ - return 1; - } - else{ - return 0; + if($line =~ /^Status/){ + if($line eq "Status = Success\n"){ + print "true"; + return 1; + } + else{ + print "false"; + return 0; + } } } }