summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2008-12-16 13:38:17 +0000
committerPascal Rigaux <pixel@mandriva.com>2008-12-16 13:38:17 +0000
commit8a21162610636c7e12e20288c40b0965dea16fb4 (patch)
treeec208c4624c88d816743ca84b576c20acb4fd707
parent68166adb27d6afdea035c09eca98d93b430f72c8 (diff)
downloaddrakx-8a21162610636c7e12e20288c40b0965dea16fb4.tar
drakx-8a21162610636c7e12e20288c40b0965dea16fb4.tar.gz
drakx-8a21162610636c7e12e20288c40b0965dea16fb4.tar.bz2
drakx-8a21162610636c7e12e20288c40b0965dea16fb4.tar.xz
drakx-8a21162610636c7e12e20288c40b0965dea16fb4.zip
- bootloader-config:
o do not modify /boot/vmlinuz symlinks before doing mkinitrd in case mkinitrd fails (#44862)
-rw-r--r--perl-install/NEWS3
-rw-r--r--perl-install/bootloader.pm14
2 files changed, 11 insertions, 6 deletions
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);
}