2
0
mirror of https://github.com/munin-monitoring/contrib.git synced 2018-11-08 00:59:34 +01:00

Merge pull request #2 from allanwind/master

rebuild always return 0
This commit is contained in:
Steve Schnepp 2012-01-13 00:55:48 -08:00
commit 3ac098ab54

View File

@ -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;