Code

Fix always reading status from the last line (1045506)
authorMatthew Kent <mattkent@users.sourceforge.net>
Sat, 20 Nov 2004 22:43:51 +0000 (22:43 +0000)
committerMatthew Kent <mattkent@users.sourceforge.net>
Sat, 20 Nov 2004 22:43:51 +0000 (22:43 +0000)
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@917 f882894a-f735-0410-b71e-b25c423dba1c

contrib/check_linux_raid.pl

index 44f166b15dde38f87cf67b916a06ebee47443d09..25fdf88a7a5f8224eb950bcc893251de1c09d9cb 100644 (file)
@@ -36,9 +36,11 @@ while(<MDSTAT>) {
     if ($found) {
         if (/(\[[_U]+\])/) {
             $status = $1;
-        } elsif (/recovery = (.*?)\s/) {  
+            last;
+    } elsif (/recovery = (.*?)\s/) {  
             $recovery = $1;
             ($finish) = /finish=(.*?min)/;
+           last;
         }
     } else {
         if (/$ARGV[0]/) {