From 7f734cec799c0e17b497a6b8920fdabcaed610c7 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Wed, 29 Oct 2008 00:28:40 +0000 Subject: pass initrd tree and file path --- lib/MDV/Draklive/Initrd.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'lib/MDV/Draklive/Initrd.pm') 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)); -- cgit v1.2.1