From 94372969d87a32c4246b6c58ab002f6683c432a6 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Tue, 26 May 2009 14:36:50 +0000 Subject: do not create initrd symlink or append splash if no initrd has been created --- lib/MDV/Draklive/Initrd.pm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/MDV/Draklive/Initrd.pm b/lib/MDV/Draklive/Initrd.pm index 84d81f3..eb0eef8 100644 --- a/lib/MDV/Draklive/Initrd.pm +++ b/lib/MDV/Draklive/Initrd.pm @@ -279,12 +279,14 @@ sub create_classical_initrd { run_({ root => $root }, 'mkinitrd', '-v', '-f', $initrd_long, $kernel); run_({}, 'umount', $root . '/sys'); run_({}, 'umount', $root . '/proc'); - symlinkf(basename($initrd_long), $root . $initrd_short); symlinkf(basename($vmlinuz_long), $root . $vmlinuz_short); - if ($live->{system}{vga_mode} && $live->{system}{splash} ne 'no') { - require bootloader; - local $::prefix = $live->get_system_root; - bootloader::add_boot_splash($initrd_long, $live->{system}{vga_mode}); + if (-f $root . $initrd_long) { + symlinkf(basename($initrd_long), $root . $initrd_short); + if ($live->{system}{vga_mode} && $live->{system}{splash} ne 'no') { + require bootloader; + local $::prefix = $live->get_system_root; + bootloader::add_boot_splash($initrd_long, $live->{system}{vga_mode}); + } } } -- cgit v1.2.1