summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakboot
diff options
context:
space:
mode:
authorMystery Man <unknown@mandriva.org>2000-11-08 00:01:16 +0000
committerMystery Man <unknown@mandriva.org>2000-11-08 00:01:16 +0000
commitd5c526273db473a7d87a26000585900fc10dda7d (patch)
tree0fdaabe7a00921b6cc556601b103d344fc7ac781 /perl-install/standalone/drakboot
parent9c164312d4bfff6d93e1c4529de6b992f2bebc44 (diff)
downloaddrakx-d5c526273db473a7d87a26000585900fc10dda7d.tar
drakx-d5c526273db473a7d87a26000585900fc10dda7d.tar.gz
drakx-d5c526273db473a7d87a26000585900fc10dda7d.tar.bz2
drakx-d5c526273db473a7d87a26000585900fc10dda7d.tar.xz
drakx-d5c526273db473a7d87a26000585900fc10dda7d.zip
This commit was manufactured by cvs2svn to create branch
'unlabeled-1.1.1'.
Diffstat (limited to 'perl-install/standalone/drakboot')
-rwxr-xr-xperl-install/standalone/drakboot34
1 files changed, 6 insertions, 28 deletions
diff --git a/perl-install/standalone/drakboot b/perl-install/standalone/drakboot
index a1c252f3c..33af4079a 100755
--- a/perl-install/standalone/drakboot
+++ b/perl-install/standalone/drakboot
@@ -2,7 +2,7 @@
use lib qw(/usr/lib/libDrakX);
-use common qw(:common :system :file :functional);
+use common qw(:system :file :functional);
use interactive;
use any;
use lilo;
@@ -12,37 +12,13 @@ use c;
local $_ = join '', @ARGV;
-/-h/ and die "usage: drakboot [--expert]\n";
+/-h/ and die "usage: drakboot\n";
-$::expert = /-expert/;
$::isStandalone = 1;
my $in = vnew interactive('su');
-my %l = (
- arch() !~ /sparc|alpha/ ? (
- _("Configure LILO/GRUB") => '',
- _("Create a boot floppy") => ['/usr/X11R6/bin/drakfloppy'],
- ) : (),
- _("Format floppy") => [ '/usr/bin/kfloppy', '/usr/bin/gfloppy' ],
-);
-
-while (my ($k, $v) = each %l) {
- $v or next;
- foreach (@$v) {
- -x $_ and $l{$k} = $_, last;
- }
- -x $l{$k} or delete $l{$k};
-}
-
-if ($ENV{DISPLAY} && c::Xtest($ENV{DISPLAY})) {
- my $cmd = $l{$in->ask_from_list(_("Choice"), _("What do you want to do?"), [ keys %l ])};
- exec $cmd if $cmd;
-}
-
my $bootloader = lilo::read('', '/etc/lilo.conf');
-local ($_) = `detectloader`;
-$bootloader->{methods} = { lilo => 1, grub => !!/grub/i };
my $hds = catch_cdie { fsedit::hds([ detect_devices::hds() ], {}) } sub { 1 };
my $fstab = [ fsedit::get_fstab(@$hds) ];
@@ -51,9 +27,11 @@ fs::get_mntpoints_from_fstab($fstab);
ask:
any::setupBootloader($in, $bootloader, $hds, $fstab, $ENV{SECURE_LEVEL}) or $in->exit(0);
-eval { lilo::install('', $bootloader, $fstab, $hds) };
+eval { lilo::install('', $bootloader) };
+my $err = $@;
+eval { lilo::install_grub('', $bootloader, $fstab, $hds) };
-if ($@) {
+if ($err && $@) {
$in->ask_warn('',
[ _("Installation of LILO failed. The following error occured:"),
grep { !/^Warning:/ } cat_("/tmp/.error") ]);