diff options
Diffstat (limited to 'lib/MDV')
-rw-r--r-- | lib/MDV/Draklive/Initrd.pm | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/MDV/Draklive/Initrd.pm b/lib/MDV/Draklive/Initrd.pm index ff81307..c856e84 100644 --- a/lib/MDV/Draklive/Initrd.pm +++ b/lib/MDV/Draklive/Initrd.pm @@ -169,7 +169,10 @@ sub create_initrd_for_media { my @extra_modules_closure = map { list_modules::modname2filename($_) } uniq(map { list_modules::dependencies_closure($_) } @$extra_modules); create_initrd_scriptlet($live, $media, @extra_modules_closure, @additional_modules); - compress_initrd_tree($live, $media); + + my $initrd = $live->get_builddir . $live->{prefix}{build}{boot} . $media->get_initrd_path; + compress_initrd_tree($live, $media, $initrd_tree, $initrd); + add_splash($live, $media); } @@ -221,14 +224,13 @@ sub create_initrd_scriptlet { } sub compress_initrd_tree { - my ($live, $media) = @_; + my ($live, $media, $initrd_tree, $initrd) = @_; - my $initrd_tree = $live->get_builddir . $live->{prefix}{build}{initrd} . '/' . $media->{storage}; my $size = chomp_(run_program::get_stdout("du -ks $initrd_tree | awk '{print \$1}'")); my $inodes = chomp_(run_program::get_stdout("find $initrd_tree | wc -l")) + 100; my $initrd_size = $size + 350 + int($inodes / 10); #- 10 inodes needs 1K $initrd_size += 600; # splashy - my $initrd = $live->get_builddir . $live->{prefix}{build}{boot} . $media->get_initrd_path; + $initrd =~ s/.gz$//; mkdir_p(dirname($initrd)); |