From 9703858ba325d069a1a8538a655e3aa186382aa9 Mon Sep 17 00:00:00 2001 From: Alex Bradley Date: Fri, 21 Sep 2012 21:44:41 -0700 Subject: This patch fixes the regular expression for the array recovery completion percentage to detect the percentage when there is more than one space between between "recovery =" and the percentage. (When the percentage is less than 10%, /proc/mdstat shows it left-padded with an extra space: "recovery = 7.6%".) --- contrib/check_linux_raid.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'contrib') diff --git a/contrib/check_linux_raid.pl b/contrib/check_linux_raid.pl index 77e75f6d..c24b0cd2 100644 --- a/contrib/check_linux_raid.pl +++ b/contrib/check_linux_raid.pl @@ -61,7 +61,7 @@ while(defined $nextdev){ if (defined $device) { if (/(\[[_U]+\])/) { $status{$device} = $1; - } elsif (/recovery = (.*?)\s/) { + } elsif (/recovery =\s+(.*?)\s/) { $recovery{$device} = $1; ($finish{$device}) = /finish=(.*?min)/; $device=undef; -- cgit v1.2.3-74-g34f1