diff options
author | Olivier Blin <oblin@mandriva.com> | 2009-07-28 16:28:14 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2009-07-28 16:28:14 +0000 |
commit | 302187e05bb4c920507e43604f36a5916b68fa0c (patch) | |
tree | 5da668e2eff3c32aad42f2ec79cc186f48e58482 /lib/MDV | |
parent | d72ed7f4c1ae50f8b9c7b1e087ce21d75e630a57 (diff) | |
download | draklive-302187e05bb4c920507e43604f36a5916b68fa0c.tar draklive-302187e05bb4c920507e43604f36a5916b68fa0c.tar.gz draklive-302187e05bb4c920507e43604f36a5916b68fa0c.tar.bz2 draklive-302187e05bb4c920507e43604f36a5916b68fa0c.tar.xz draklive-302187e05bb4c920507e43604f36a5916b68fa0c.zip |
detect some modules as built-in and do not wrongly abort
Diffstat (limited to 'lib/MDV')
-rw-r--r-- | lib/MDV/Draklive/Initrd.pm | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/MDV/Draklive/Initrd.pm b/lib/MDV/Draklive/Initrd.pm index c02fa5b..a40de3a 100644 --- a/lib/MDV/Draklive/Initrd.pm +++ b/lib/MDV/Draklive/Initrd.pm @@ -8,6 +8,11 @@ use MDV::Draklive::StorageFS; use MDV::Draklive::Loopback; use MDV::Draklive::Overlay; +my %module_to_config = ( + ext3 => 'EXT3_FS', + sd_mod => 'BLK_DEV_SD', +); + sub nls_modules { my ($live) = @_; my $fs = $live->{media}->get_media_setting('fs'); @@ -138,7 +143,11 @@ sub create_media_specific_initrd { } my @missing = sort(difference2($extra_missing, \@additional_modules)); - @missing and die "missing mandatory modules:\n" . join("\n", @missing, ''); + if (@missing) { + my @config = map { if_(/^CONFIG_(.*)=y$/, $1) } cat_($root . "/boot/config-" . $kernel); + my @really_missing = grep { !member($module_to_config{$_}, @config) } @missing; + @really_missing and die "missing mandatory modules:\n" . join("\n", @really_missing, ''); + } mkdir_p($initrd_tree . $kernel_root . "/kernel"); my @modules = (@$storage_modules, @$extra_modules); |