summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-08-27 09:43:50 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-08-27 09:43:50 +0000
commit91b3cff7370ce5ebac761c40c8c41a35345a51b0 (patch)
tree7b5eff45ea33655dd39bc1b13ed7c2ee76243cff
parent8699372b5b06dd59d6ad895b438b23d0b826c80e (diff)
downloaddrakx-91b3cff7370ce5ebac761c40c8c41a35345a51b0.tar
drakx-91b3cff7370ce5ebac761c40c8c41a35345a51b0.tar.gz
drakx-91b3cff7370ce5ebac761c40c8c41a35345a51b0.tar.bz2
drakx-91b3cff7370ce5ebac761c40c8c41a35345a51b0.tar.xz
drakx-91b3cff7370ce5ebac761c40c8c41a35345a51b0.zip
- fix loading linux software raid (mdadm) kernel modules
(after rename raid5&raid6 -> raid456)
-rw-r--r--perl-install/install/NEWS3
-rw-r--r--perl-install/raid.pm16
2 files changed, 14 insertions, 5 deletions
diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS
index 37cb321cd..54042146d 100644
--- a/perl-install/install/NEWS
+++ b/perl-install/install/NEWS
@@ -1,3 +1,6 @@
+- fix loading linux software raid (mdadm) kernel modules
+ (after rename raid5&raid6 -> raid456)
+
Version 10.4.179 - 24 August 2007, by Thierry Vignaud
- install kernel-desktop-devel-latest instead of
diff --git a/perl-install/raid.pm b/perl-install/raid.pm
index 0475b68ef..91b6e9faf 100644
--- a/perl-install/raid.pm
+++ b/perl-install/raid.pm
@@ -96,11 +96,16 @@ sub updateSize {
sub module {
my ($part) = @_;
- my $mod = $part->{level};
+ my $level = $part->{level};
+ log::l("level $level");
- $mod = 5 if $mod eq "4";
- $mod = "raid$mod" if $mod =~ /^\d+$/;
- $mod;
+ if (member($level, 4, 5, 6)) {
+ 'raid456';
+ } elsif ($level eq '1') {
+ 'raid1';
+ } else {
+ $level;
+ }
}
@@ -191,7 +196,7 @@ sub detect_during_install_once {
run_program::run('mdadm', '>>', '/etc/mdadm.conf', '--examine', '--scan');
foreach (@{parse_mdadm_conf(scalar cat_('/etc/mdadm.conf'))->{ARRAY}}) {
- eval { modules::load($_->{level}) };
+ eval { modules::load(module($_)) };
}
run_program::run('mdadm', '--assemble', '--scan');
}
@@ -266,6 +271,7 @@ sub parse_mdadm_conf {
push @{$conf{DEVICE}}, split(' ', $1);
} elsif (my ($md, $md_conf) = /^ARRAY\s+(\S+)\s*(.*)/) {
my %md_conf = map { if_(/(.*)=(.*)/, $1 => $2) } split(' ', $md_conf);
+ $md_conf{level} =~ s/^raid//;
$md_conf{device} = $md;
push @{$conf{ARRAY}}, \%md_conf;
}