Explorar o código

Fix always reading status from the last line (1045506)

git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/nagiosplug/trunk@917 f882894a-f735-0410-b71e-b25c423dba1c
Matthew Kent %!s(int64=21) %!d(string=hai) anos
pai
achega
ef71bc5f57
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      contrib/check_linux_raid.pl

+ 3 - 1
contrib/check_linux_raid.pl

@@ -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]/) {