From 41ca30d832b511c9daee95d956fd581b1f217d28 Mon Sep 17 00:00:00 2001 From: Allan Wind Date: Thu, 12 Jan 2012 13:40:29 -0500 Subject: [PATCH] rebuild is always 0 --- plugins/other/raid | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/other/raid b/plugins/other/raid index ab5522e7..90ccd56f 100755 --- a/plugins/other/raid +++ b/plugins/other/raid @@ -55,8 +55,8 @@ if ( $ARGV[0] and $ARGV[0] eq "config" ) { my $pct = 100 * $nact / $nmem; my $rpct = 100; if ( $pct < 100 ) { - my $output = `/sbin/mdadm -D /dev/$dev | grep Rebuild`; - if( $output =~ /([0-9]+)% complete/ ) { + my @output = `/sbin/mdadm -D /dev/$dev | grep Rebuild`; + if( $output[0] =~ /([0-9]+)% complete/ ) { $rpct = $1; } else { $rpct = 0;