summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);
}
}