From 897f77ac5555472e32fa9997bc5ff5584461ca56 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 30 Aug 2005 11:30:53 +0000 Subject: propose to create a default bootloader configuration when no bootloader is found --- perl-install/standalone/drakboot | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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() }; -- cgit v1.2.1