summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
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 /perl-install/bootloader.pm
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)
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm14
1 files changed, 8 insertions, 6 deletions
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);
}