diff options
author | Matthew Kent <mattkent@users.sourceforge.net> | 2004-11-20 22:43:51 +0000 |
---|---|---|
committer | Matthew Kent <mattkent@users.sourceforge.net> | 2004-11-20 22:43:51 +0000 |
commit | ef71bc5f57d03f4d86eab0b8d8d73c6c8546522f (patch) | |
tree | 17da670b20bc8c99ece88f1f44d2a1c8e4f3a44d /contrib | |
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')
-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 44f166b1..25fdf88a 100644 --- a/contrib/check_linux_raid.pl +++ b/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]/) { |