summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-01-07 17:29:58 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-01-07 17:29:58 +0000
commit132e12d104425e16ba64d85cee9c47030a4dd262 (patch)
tree1511d387417dc20198537d052e52f387a1046e23 /perl-install/bootloader.pm
parent8f3ee68c119625d19a8addfdfcf375425828cc1c (diff)
downloaddrakx-132e12d104425e16ba64d85cee9c47030a4dd262.tar
drakx-132e12d104425e16ba64d85cee9c47030a4dd262.tar.gz
drakx-132e12d104425e16ba64d85cee9c47030a4dd262.tar.bz2
drakx-132e12d104425e16ba64d85cee9c47030a4dd262.tar.xz
drakx-132e12d104425e16ba64d85cee9c47030a4dd262.zip
handle lilo not installed
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm16
1 files changed, 5 insertions, 11 deletions
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;