diff options
author | Matthew Kent <mattkent@users.sourceforge.net> | 2004-11-20 22:43:51 (GMT) |
---|---|---|
committer | Matthew Kent <mattkent@users.sourceforge.net> | 2004-11-20 22:43:51 (GMT) |
commit | ef71bc5f57d03f4d86eab0b8d8d73c6c8546522f (patch) | |
tree | 17da670b20bc8c99ece88f1f44d2a1c8e4f3a44d /contrib/check_linux_raid.pl | |
parent | b4a3db443bf77abc19170f1296c5c5e7c3ad6336 (diff) | |
download | monitoring-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
Diffstat (limited to 'contrib/check_linux_raid.pl')
-rw-r--r-- | contrib/check_linux_raid.pl | 4 |
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]/) { |