summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2009-10-14 16:25:21 +0000
committerOlivier Blin <oblin@mandriva.com>2009-10-14 16:25:21 +0000
commited80c570d284d006d1fb4fd2adfcac6c3b6087f8 (patch)
treea58b582350cf0a0677d1e26ffbc3958706f0e45f
parent7e338fd436f0d505efdd8c76289ef24271f01eb8 (diff)
downloaddrakiso-ed80c570d284d006d1fb4fd2adfcac6c3b6087f8.tar
drakiso-ed80c570d284d006d1fb4fd2adfcac6c3b6087f8.tar.gz
drakiso-ed80c570d284d006d1fb4fd2adfcac6c3b6087f8.tar.bz2
drakiso-ed80c570d284d006d1fb4fd2adfcac6c3b6087f8.tar.xz
drakiso-ed80c570d284d006d1fb4fd2adfcac6c3b6087f8.zip
handle initrd in chroot (to further factorize)
-rw-r--r--lib/MDV/Draklive/Initrd.pm19
1 files changed, 14 insertions, 5 deletions
diff --git a/lib/MDV/Draklive/Initrd.pm b/lib/MDV/Draklive/Initrd.pm
index b2375b0..78bde95 100644
--- a/lib/MDV/Draklive/Initrd.pm
+++ b/lib/MDV/Draklive/Initrd.pm
@@ -274,17 +274,26 @@ sub compress_initrd_tree {
sub add_splash {
my ($live, $initrd) = @_;
if ($live->{system}{vga_mode} && $live->{system}{splash} ne 'no') {
- my $tmp_initrd = '/tmp/initrd.gz';
- cp_f($initrd, $live->get_system_root . $tmp_initrd);
+ my $chroot_initrd;
+ if ($initrd !~ m,^/boot/,) {
+ $chroot_initrd = '/tmp/initrd.gz';
+ cp_f($initrd, $live->get_system_root . $chroot_initrd);
+ } else {
+ $chroot_initrd = $initrd;
+ }
+
{
local $::prefix = $live->get_system_root;
#- also calls switch-themes -u (through make-boot-splash)
#- which will regenerate gfxboot current link
require bootloader;
- bootloader::add_boot_splash($tmp_initrd, $live->{system}{vga_mode});
+ bootloader::add_boot_splash($chroot_initrd, $live->{system}{vga_mode});
+ }
+
+ if ($chroot_initrd ne $initrd) {
+ cp_f($live->get_system_root . $chroot_initrd, $initrd);
+ unlink($live->get_system_root . $chroot_initrd);
}
- cp_f($live->get_system_root . $tmp_initrd, $initrd);
- unlink($live->get_system_root . $tmp_initrd);
}
}