Exit if PD command fails

This commit is contained in:
Georg Schönberger
2014-10-20 13:45:51 +02:00
parent 0e4f7654da
commit dc5369119b

View File

@@ -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;
}