summaryrefslogtreecommitdiffstats
path: root/lib/MDV/Draklive/Initrd.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-10-29 00:28:40 +0000
committerOlivier Blin <oblin@mandriva.com>2008-10-29 00:28:40 +0000
commit7f734cec799c0e17b497a6b8920fdabcaed610c7 (patch)
treece9fd8191db7156d0a62b991d936c9242b9eb5d9 /lib/MDV/Draklive/Initrd.pm
parent3e8b6d6a07270ca8819c1c47e9234b903ea8e05d (diff)
downloaddrakiso-7f734cec799c0e17b497a6b8920fdabcaed610c7.tar
drakiso-7f734cec799c0e17b497a6b8920fdabcaed610c7.tar.gz
drakiso-7f734cec799c0e17b497a6b8920fdabcaed610c7.tar.bz2
drakiso-7f734cec799c0e17b497a6b8920fdabcaed610c7.tar.xz
drakiso-7f734cec799c0e17b497a6b8920fdabcaed610c7.zip
pass initrd tree and file path
Diffstat (limited to 'lib/MDV/Draklive/Initrd.pm')
-rw-r--r--lib/MDV/Draklive/Initrd.pm10
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));