From 8a21162610636c7e12e20288c40b0965dea16fb4 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 16 Dec 2008 13:38:17 +0000 Subject: - bootloader-config: o do not modify /boot/vmlinuz symlinks before doing mkinitrd in case mkinitrd fails (#44862) --- perl-install/NEWS | 3 +++ perl-install/bootloader.pm | 14 ++++++++------ 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'perl-install') diff --git a/perl-install/NEWS b/perl-install/NEWS index c4e3ed518..27ceb3b47 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,3 +1,6 @@ +- bootloader-config: + o do not modify /boot/vmlinuz symlinks before doing mkinitrd in case + mkinitrd fails (#44862) - diskdrake: o --nfs: handle "host:/" (#44320) diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index f98e04405..dc5c1df58 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -709,18 +709,20 @@ sub add_kernel { $b_nolink ||= $kernel_str->{use_long_name}; my $vmlinuz_long = kernel_str2vmlinuz_long($kernel_str); + my $initrd_long = kernel_str2initrd_long($kernel_str); $v->{kernel_or_dev} = "/boot/$vmlinuz_long"; -e "$::prefix$v->{kernel_or_dev}" or log::l("unable to find kernel image $::prefix$v->{kernel_or_dev}"), return; - if (!$b_nolink) { - $v->{kernel_or_dev} = '/boot/' . kernel_str2vmlinuz_short($kernel_str); - _do_the_symlink($bootloader, $v->{kernel_or_dev}, $vmlinuz_long); - } log::l("adding $v->{kernel_or_dev}"); if (!$b_no_initrd) { - my $initrd_long = kernel_str2initrd_long($kernel_str); $v->{initrd} = mkinitrd($kernel_str->{version}, $bootloader, $v, "/boot/$initrd_long"); - if ($v->{initrd} && !$b_nolink) { + } + + if (!$b_nolink) { + $v->{kernel_or_dev} = '/boot/' . kernel_str2vmlinuz_short($kernel_str); + _do_the_symlink($bootloader, $v->{kernel_or_dev}, $vmlinuz_long); + + if ($v->{initrd}) { $v->{initrd} = '/boot/' . kernel_str2initrd_short($kernel_str); _do_the_symlink($bootloader, $v->{initrd}, $initrd_long); } -- cgit v1.2.1