diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/detect_devices.pm | 2 | ||||
-rw-r--r-- | perl-install/raid.pm | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm index 5487a7ca2..28898576c 100644 --- a/perl-install/detect_devices.pm +++ b/perl-install/detect_devices.pm @@ -757,7 +757,7 @@ sub raidAutoStartRaidtab { #- (choosing any inactive md) raid::inactivate_all(); foreach (@parts) { - my $nb = find { !raid::is_active("md$_") } 0..7; + my $nb = find { !raid::is_active("md$_") } 0 .. raid::max_nb(); output("/tmp/raidtab", "raiddev /dev/md$nb\n device " . devices::make($_->{device}) . "\n"); run_program::run('raidstart', '-c', "/tmp/raidtab", devices::make("md$nb")); } diff --git a/perl-install/raid.pm b/perl-install/raid.pm index ab6fa0fcb..c59bc3021 100644 --- a/perl-install/raid.pm +++ b/perl-install/raid.pm @@ -13,6 +13,8 @@ use devices; use modules; use fs; +sub max_nb { 31 } + sub nb { my ($nb) = @_; first((ref $nb ? $nb->{device} : $nb) =~ /(\d+)/); @@ -177,6 +179,6 @@ sub is_active { cat_("/proc/mdstat") =~ /^$dev /m; } -sub inactivate_all() { run_program::run("raidstop", devices::make("md$_")) foreach 0..7 } +sub inactivate_all() { run_program::run("raidstop", devices::make("md$_")) foreach 0..max_nb() } 1; |