X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=contrib%2Fcheck_linux_raid.pl;h=d2e5b4632d4b2b5631f38e45605388a74886efc1;hb=753b88408833702dbcf004e00a846550c2a0e952;hp=da1aff84790fa2e74ae8480aa2f0032834e65a08;hpb=29d5acb7c821c8be23b32be9e01b242efad5b872;p=nagiosplug.git diff --git a/contrib/check_linux_raid.pl b/contrib/check_linux_raid.pl index da1aff8..d2e5b46 100644 --- a/contrib/check_linux_raid.pl +++ b/contrib/check_linux_raid.pl @@ -44,7 +44,7 @@ sub max_state($$){ my $nextdev; if(defined $ARGV[0]) { $nextdev = shift; } -else { $nextdev = "md[0-9]"; } +else { $nextdev = "md[0-9]+"; } my $code = "UNKNOWN"; my $msg = ""; @@ -64,6 +64,7 @@ while(defined $nextdev){ } elsif (/recovery = (.*?)\s/) { $recovery{$device} = $1; ($finish{$device}) = /finish=(.*?min)/; + $device=undef; } elsif (/^\s*$/) { $device=undef; }