Selaa lähdekoodia

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 21 vuotta sitten
vanhempi
commit
ef71bc5f57
1 muutettua tiedostoa jossa 3 lisäystä ja 1 poistoa
  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]/) {