summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-11-29 17:27:23 +0000
committerOlivier Blin <oblin@mandriva.org>2005-11-29 17:27:23 +0000
commit55558a4367a3c7dc36211c426d5becf08a967c6a (patch)
tree33c7ce245bdd0274b97a73cfa9ed87fb1a82d19a /tools
parent51ff7a1f74807de44e9e0a7309553413e7f514c2 (diff)
downloaddrakx-55558a4367a3c7dc36211c426d5becf08a967c6a.tar
drakx-55558a4367a3c7dc36211c426d5becf08a967c6a.tar.gz
drakx-55558a4367a3c7dc36211c426d5becf08a967c6a.tar.bz2
drakx-55558a4367a3c7dc36211c426d5becf08a967c6a.tar.xz
drakx-55558a4367a3c7dc36211c426d5becf08a967c6a.zip
don't die if non-mandatory modules are missing, warn and skip them
Diffstat (limited to 'tools')
-rwxr-xr-xtools/draklive12
1 files changed, 9 insertions, 3 deletions
diff --git a/tools/draklive b/tools/draklive
index 7ddc394e8..ea285ed56 100755
--- a/tools/draklive
+++ b/tools/draklive
@@ -252,19 +252,25 @@ sub create_initrd {
(map { $_, $_ . '1' } map { "sd$_" } ('a' .. 'h'));
load_moddeps($live->{system}{root}, "/lib/modules/" . $live->{system}{kernel});
- my ($modules, $unknown) = partition { exists $moddeps{$_} }
- uniq(map { modules::cond_mapping_24_26($_) } category2modules($storage_modules{$live->{media}{storage}})),
+
+ my ($modules, $skipped) = partition { exists $moddeps{$_} }
+ uniq(map { modules::cond_mapping_24_26($_) } category2modules($storage_modules{$live->{media}{storage}}));
+ my ($extra_modules, $missing) = partition { exists $moddeps{$_} }
nls_modules($live),
$live->{media}{fs},
@{$live->{media}{modules} || []},
(map { @{$loop{$_}{modules} || []} } uniq(map { $_->{type} } grep { $_->{type} } @{$live->{mount}{dirs} || []})),
($live->{mount}{overlay} ? @{$overlay{$live->{mount}{overlay}}{modules} || []} : ());
- @$unknown and die "unknown modules:" . join("\n", '', @$unknown);
+
+ @$missing and die "missing mandatory modules:" . join("\n", '', sort(@$missing));
+ push @$modules, @$extra_modules;
my @module_deps = uniq(map { moddeps_closure($_) } @$modules);
run_('gzip', '>', $live->{initrd_tree} . "/lib/$_.ko", '-dc', $live->{system}{root} . $moddeps{$_}{full})
foreach @module_deps, @$modules;
+ @$skipped and warn "skipped modules:" . join("\n", '', sort(@$skipped));
+
create_initrd_linuxrc($live, @module_deps, @$modules);
compress_initrd_tree($live);
add_splash($live);