summaryrefslogtreecommitdiffstats
path: root/lib/MDV
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MDV')
-rw-r--r--lib/MDV/Draklive/Initrd.pm11
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);