From 91b3cff7370ce5ebac761c40c8c41a35345a51b0 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 27 Aug 2007 09:43:50 +0000 Subject: - fix loading linux software raid (mdadm) kernel modules (after rename raid5&raid6 -> raid456) --- perl-install/install/NEWS | 3 +++ perl-install/raid.pm | 16 +++++++++++----- 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; } -- cgit v1.2.1