summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakboot
diff options
context:
space:
mode:
authorYves Duret <yduret@mandriva.com>2001-04-09 12:50:01 +0000
committerYves Duret <yduret@mandriva.com>2001-04-09 12:50:01 +0000
commit675bf00c2e32d3e7adff71515d532206d432af75 (patch)
treebed9877b48ebacdfa724bc413a5907b25581772b /perl-install/standalone/drakboot
parentd3176bb4255f769460392476b8613c1ff1a5ee16 (diff)
downloaddrakx-675bf00c2e32d3e7adff71515d532206d432af75.tar
drakx-675bf00c2e32d3e7adff71515d532206d432af75.tar.gz
drakx-675bf00c2e32d3e7adff71515d532206d432af75.tar.bz2
drakx-675bf00c2e32d3e7adff71515d532206d432af75.tar.xz
drakx-675bf00c2e32d3e7adff71515d532206d432af75.zip
added lilo/grub
Diffstat (limited to 'perl-install/standalone/drakboot')
-rwxr-xr-xperl-install/standalone/drakboot52
1 files changed, 30 insertions, 22 deletions
diff --git a/perl-install/standalone/drakboot b/perl-install/standalone/drakboot
index 4aee3c2cd..cc376e398 100755
--- a/perl-install/standalone/drakboot
+++ b/perl-install/standalone/drakboot
@@ -23,28 +23,36 @@ $::expert = /-expert/;
my $in = interactive->vnew('su');
require 'bootlook.pm' if ref($in) =~ /gtk/;
-
-
-my $bootloader = bootloader::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) ];
-fs::get_mntpoints_from_fstab($fstab);
-
-ask:
-any::setupBootloader($in, $bootloader, $hds, $fstab, $ENV{SECURE_LEVEL}) or $in->exit(0);
-eval { bootloader::install('', $bootloader, $fstab, $hds) };
-
-if ($@) {
- $in->ask_warn('',
- [ _("Installation of LILO failed. The following error occured:"),
+lilo_choice();
+
+
+sub lilo_choice
+{
+ my $bootloader = bootloader::read('', '/etc/lilo.conf');
+ local ($_) = `detectloader`;
+ $bootloader->{methods} = { lilo => 1, grub => !!/grub/i };
+ print $bootloader . "\n";
+
+
+ my ($hds) = catch_cdie { fsedit::hds([ detect_devices::hds() ], {}) } sub { 1 };
+ my $fstab = [ fsedit::get_fstab(@$hds) ];
+ fs::get_mntpoints_from_fstab($fstab);
+
+ $::expert=1;
+
+ ask:
+ any::setupBootloader($in, $bootloader, $hds, $fstab, $ENV{SECURE_LEVEL}) or $in->exit(0);
+ #eval { bootloader::install('', $bootloader, $fstab, $hds) };
+
+ if ($@) {
+ $in->ask_warn('',
+ [ _("Installation of LILO failed. The following error occured:"),
grep { !/^Warning:/ } cat_("/tmp/.error") ]);
- unlink "/tmp/.error";
- goto ask;
+ unlink "/tmp/.error";
+ goto ask;
+ }
}
+ !$::isEmbedded and $in->exit(0);
+ kill(USR1, $::CCPID);
+ goto ask;
-!$::isEmbedded and $in->exit(0);
-kill(USR1, $::CCPID);
-goto ask;