summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Kent <mattkent@users.sourceforge.net>2004-11-20 22:43:51 (GMT)
committerMatthew Kent <mattkent@users.sourceforge.net>2004-11-20 22:43:51 (GMT)
commitef71bc5f57d03f4d86eab0b8d8d73c6c8546522f (patch)
tree17da670b20bc8c99ece88f1f44d2a1c8e4f3a44d
parentb4a3db443bf77abc19170f1296c5c5e7c3ad6336 (diff)
downloadmonitoring-plugins-ef71bc5f57d03f4d86eab0b8d8d73c6c8546522f.tar.gz
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
-rw-r--r--contrib/check_linux_raid.pl4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/check_linux_raid.pl b/contrib/check_linux_raid.pl
index 44f166b..25fdf88 100644
--- a/contrib/check_linux_raid.pl
+++ b/contrib/check_linux_raid.pl
@@ -36,9 +36,11 @@ while(<MDSTAT>) {
36 if ($found) { 36 if ($found) {
37 if (/(\[[_U]+\])/) { 37 if (/(\[[_U]+\])/) {
38 $status = $1; 38 $status = $1;
39 } elsif (/recovery = (.*?)\s/) { 39 last;
40 } elsif (/recovery = (.*?)\s/) {
40 $recovery = $1; 41 $recovery = $1;
41 ($finish) = /finish=(.*?min)/; 42 ($finish) = /finish=(.*?min)/;
43 last;
42 } 44 }
43 } else { 45 } else {
44 if (/$ARGV[0]/) { 46 if (/$ARGV[0]/) {