summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2001-03-21 00:06:03 +0000
committerPascal Rigaux <pixel@mandriva.com>2001-03-21 00:06:03 +0000
commitd38a297097180c3e9259ffe671c9496237bda100 (patch)
treea2410a0e85fecd0f0b26e293177bf9415837e6ad
parenta5f277e49fa2b12cc94fd16ddb3a257a133b092a (diff)
downloaddrakx-d38a297097180c3e9259ffe671c9496237bda100.tar
drakx-d38a297097180c3e9259ffe671c9496237bda100.tar.gz
drakx-d38a297097180c3e9259ffe671c9496237bda100.tar.bz2
drakx-d38a297097180c3e9259ffe671c9496237bda100.tar.xz
drakx-d38a297097180c3e9259ffe671c9496237bda100.zip
(add_kernel): cleanup
(suggest): make it work with kernel22-secure and no kernel22
-rw-r--r--perl-install/bootloader.pm12
1 files changed, 5 insertions, 7 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index daf37ef60..32ee2b86d 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -151,11 +151,8 @@ sub add_entry($$) {
sub add_kernel($$$$$) {
my ($prefix, $lilo, $kernelVersion, $specific, $v) = @_;
my $ext = $specific && "-$specific"; $specific =~ s/\d+\.\d+|hack//;
- my $kname = "vmlinuz";
- if (arch() =~ /ppc/) {
- $kname = "vmlinux";
- }
- my ($vmlinuz, $image, $initrdImage) = ("$kname-$kernelVersion$specific", "/boot/$kname$ext", "/boot/initrd$ext.img");
+ my $kname = arch() =~ /ppc/ ? "vmlinux" : "vmlinuz";
+ my ($vmlinuz, $image, $initrdImage) = ("$kname-$kernelVersion$specific", "/boot/$kname$ext", "/boot/initrd$ext.img");
-e "$prefix/boot/$vmlinuz" or log::l("unable to find kernel image $prefix/boot/$vmlinuz"), return;
{
my $f = "initrd-$kernelVersion$specific.img";
@@ -324,11 +321,12 @@ wait %d seconds for default boot.
label => $oldSecure || $oldSMP ? "linux-${_}up" : "linux-${_}nonfb",
root => "/dev/$root",
}) if $oldSecure || $oldSMP || $vga_fb;
- add_kernel($prefix, $lilo, $oldVersion, $_,
+ my $entry = add_kernel($prefix, $lilo, $oldVersion, $_,
{
label => "failsafe-$_",
root => "/dev/$root",
- })->{append} .= " failsafe" unless $lilo->{password};
+ });
+ $entry->{append} .= " failsafe" if $entry && !$lilo->{password};
}
}