summaryrefslogtreecommitdiffstats
path: root/lib/MDV
diff options
context:
space:
mode:
Diffstat (limited to 'lib/MDV')
-rw-r--r--lib/MDV/Draklive/Initrd.pm8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/MDV/Draklive/Initrd.pm b/lib/MDV/Draklive/Initrd.pm
index be6513b..6d2dca8 100644
--- a/lib/MDV/Draklive/Initrd.pm
+++ b/lib/MDV/Draklive/Initrd.pm
@@ -52,8 +52,12 @@ sub inst_initrd_bin {
sub create_initrd_for_media {
my ($live, $media) = @_;
+ my $initrd = $live->get_builddir . $live->{prefix}{build}{boot} . $media->get_initrd_path;
+ create_media_specific_initrd($live, $media, $live->get_system_root, $live->find_kernel, $initrd);
+}
- my $root = $live->get_system_root;
+sub create_media_specific_initrd {
+ my ($live, $media, $root, $initrd, $kernel) = @_;
my $lib_prefix = find { glob($root . $_ . '/libc.so.*') } qw(/lib64 /lib);
$lib_prefix or die 'unable to find system libraries in /lib or /lib64';
@@ -112,7 +116,6 @@ sub create_initrd_for_media {
mkdir_p($initrd_tree . "/dev/loop");
cp_af($initrd_tree . "/dev/loop$_", $initrd_tree . "/dev/loop/$_") foreach 0 .. $loop_nb;
- my $kernel = $live->find_kernel;
print "using kernel $kernel\n";
my $kernel_root = "/lib/modules/" . $kernel;
list_modules::load_dependencies($root . $kernel_root . "/modules.dep");
@@ -170,7 +173,6 @@ sub create_initrd_for_media {
uniq(map { list_modules::dependencies_closure($_) } @$extra_modules);
create_initrd_scriptlet($live, $media, @extra_modules_closure, @additional_modules);
- my $initrd = $live->get_builddir . $live->{prefix}{build}{boot} . $media->get_initrd_path;
compress_initrd_tree($live, $initrd_tree, $initrd);
add_splash($live, $initrd);
}