From d38a297097180c3e9259ffe671c9496237bda100 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 21 Mar 2001 00:06:03 +0000 Subject: (add_kernel): cleanup (suggest): make it work with kernel22-secure and no kernel22 --- perl-install/bootloader.pm | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'perl-install/bootloader.pm') 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}; } } -- cgit v1.2.1