mirror of
https://github.com/thomas-krenn/check_lsi_raid.git
synced 2026-10-27 18:11:34 +01:00
Fix physical drive state check
This commit is contained in:
1 parent
728ddc966e
commit
cab028d8b1
1 file changed
+2
-2
+2
-2
@@ -484,13 +484,13 @@ sub getPhysDeviceStatus {
|
||||
# Check the overall drive state
|
||||
$output_enc = $1;
|
||||
$output_dev = $2;
|
||||
$flag = 6;
|
||||
$flag = 5;
|
||||
} elsif($line =~ /^Drive\s\/c$controller\/e([0-9]*)\/s([0-9]*)\sState\s\:/) {
|
||||
# Check the drive state in block Detailed information
|
||||
$output_enc = $1;
|
||||
$output_dev = $2;
|
||||
$flag = 1;
|
||||
} elsif($flag eq 0 && index($line, " ") eq -1) {
|
||||
} elsif($flag eq 0 && ($line =~ /^\-{5,}$/ || $line =~ /^\s*$/)) {
|
||||
# Detect the end of the block which was last checked
|
||||
$flag = -1;
|
||||
} elsif($flag eq 0) {
|
||||
|
||||
Reference in new issue
Block a user