From ef71bc5f57d03f4d86eab0b8d8d73c6c8546522f Mon Sep 17 00:00:00 2001 From: Matthew Kent Date: Sat, 20 Nov 2004 22:43:51 +0000 Subject: [PATCH] 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 --- contrib/check_linux_raid.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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() { if ($found) { if (/(\[[_U]+\])/) { $status = $1; - } elsif (/recovery = (.*?)\s/) { + last; + } elsif (/recovery = (.*?)\s/) { $recovery = $1; ($finish) = /finish=(.*?min)/; + last; } } else { if (/$ARGV[0]/) { -- 2.30.2