From dc5369119b0e2a55b1b7234c6c716ff8a59e3c5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Georg=20Sch=C3=B6nberger?= Date: Mon, 20 Oct 2014 13:45:51 +0200 Subject: [PATCH] Exit if PD command fails --- check_lsi_raid | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/check_lsi_raid b/check_lsi_raid index abc2f54..2cc1899 100755 --- a/check_lsi_raid +++ b/check_lsi_raid @@ -481,7 +481,7 @@ sub getPhysicalDevices{ my @output = `$command`; my @foundDevs; - if(checkCommandStatus(\@output)) { + if(checkCommandStatus(\@output)){ if($action eq "all") { my $currBlock; my $line_ref; @@ -555,6 +555,10 @@ sub getPhysicalDevices{ } } } + else { + print "Invalid StorCLI command! ($command)\n"; + exit(STATE_UNKNOWN); + } return \@foundDevs; }