From 132e12d104425e16ba64d85cee9c47030a4dd262 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 7 Jan 2004 17:29:58 +0000 Subject: handle lilo not installed --- perl-install/bootloader.pm | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'perl-install/bootloader.pm') diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 25c352e5f..51b59c34d 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -667,10 +667,10 @@ sub method_choices { my %choices = ( if_(arch() =~ /sparc/, 'silo' => N("SILO"), - ), if_(arch() !~ /sparc|ppc/ && !isLoopback(fsedit::get_root($fstab)), + ), if_(arch() !~ /sparc|ppc/ && !isLoopback(fsedit::get_root($fstab)) && whereis_binary('lilo'), if_(!detect_devices::matching_desc('ProSavageDDR'), 'lilo-graphic' => N("LILO with graphical menu")), 'lilo-menu' => N("LILO with text menu"), - ), if_(arch() !~ /sparc|ppc/ && !isRAID(fsedit::get_root($fstab)), + ), if_(arch() !~ /sparc|ppc/ && !isRAID(fsedit::get_root($fstab)) && whereis_binary('grub'), 'grub' => N("Grub"), ), if_(arch() =~ /ppc/, 'yaboot' => N("Yaboot"), @@ -1193,15 +1193,9 @@ sub install { } $bootloader->{keytable} = keytable($bootloader->{keytable}); - my @methods = $bootloader->{method} eq 'grub' ? ('lilo-graphic', 'grub') : $bootloader->{method}; - my @rcs = map { - my ($main_method) = /(\w+)/; - my $f = $bootloader::{"install_$main_method"} or die "unknown bootloader method $_"; - eval { $f->($bootloader, $fstab, $hds, $_) }; - $@; - } @methods; - - die $rcs[0] if every { $_ } @rcs; + my ($main_method) = $bootloader->{method} =~ /(\w+)/; + my $f = $bootloader::{"install_$main_method"} or die "unknown bootloader method $bootloader->{method}"; + $f->($bootloader, $fstab, $hds, $bootloader->{method}); } 1; -- cgit v1.2.1