summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-08-30 11:30:53 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-08-30 11:30:53 +0000
commit897f77ac5555472e32fa9997bc5ff5584461ca56 (patch)
tree70832076cf17b2d4b6e6556a282e1a3984b69fb1 /perl-install/standalone
parent67a9b7bd8043f21af7ae96b22d4a95d3027ffb11 (diff)
downloaddrakx-backup-do-not-use-897f77ac5555472e32fa9997bc5ff5584461ca56.tar
drakx-backup-do-not-use-897f77ac5555472e32fa9997bc5ff5584461ca56.tar.gz
drakx-backup-do-not-use-897f77ac5555472e32fa9997bc5ff5584461ca56.tar.bz2
drakx-backup-do-not-use-897f77ac5555472e32fa9997bc5ff5584461ca56.tar.xz
drakx-backup-do-not-use-897f77ac5555472e32fa9997bc5ff5584461ca56.zip
propose to create a default bootloader configuration when no bootloader is found
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/drakboot10
1 files changed, 9 insertions, 1 deletions
diff --git a/perl-install/standalone/drakboot b/perl-install/standalone/drakboot
index 1f4d506de..c26992258 100755
--- a/perl-install/standalone/drakboot
+++ b/perl-install/standalone/drakboot
@@ -42,9 +42,17 @@ my $all_hds = fsedit::get_hds();
fs::get_raw_hds('', $all_hds);
fs::get_info_from_fstab($all_hds);
my $fstab = [ fs::get::fstab($all_hds) ];
-my $bootloader = bootloader::read($all_hds) or die "no bootloader found\n";
my $cmdline = cat_('/proc/cmdline');
+my $bootloader = bootloader::read($all_hds);
+if (!$bootloader) {
+ $in->ask_okcancel('', N("No bootloader found, creating a new configuration"), 0) or $in->exit;
+ bootloader::suggest($bootloader ||= {}, $all_hds,
+ vga_fb => listlength(cat_("/proc/fb")),
+ quiet => $cmdline =~ /\bsplash=silent\b/,
+ );
+}
+
if (!$in->isa('interactive::gtk') || any { /^--boot$/ } @ARGV) {
$::isWizard = 1;
eval { lilo_choice() };