summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-05-19 14:12:31 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-05-19 14:12:31 +0000
commitfbc45ca35ec37193c98efe2e804278b26ef34eb6 (patch)
tree6f973421a27dfcdb83c1c0a4b4d33e43d81d529b
parent686c70f8f8b37ea58b04d339e15d4825924c67b9 (diff)
downloaddrakx-fbc45ca35ec37193c98efe2e804278b26ef34eb6.tar
drakx-fbc45ca35ec37193c98efe2e804278b26ef34eb6.tar.gz
drakx-fbc45ca35ec37193c98efe2e804278b26ef34eb6.tar.bz2
drakx-fbc45ca35ec37193c98efe2e804278b26ef34eb6.tar.xz
drakx-fbc45ca35ec37193c98efe2e804278b26ef34eb6.zip
fix #3560 (drakboot not updating bootloader label): the only confusing
bug is that when one come back to drakboot main window after having altered the bootloader, the main window still list the old bootloader as the current bootloader. let update this label. btw consolidate bootloader detection in bootloader::detect_bootloader()
-rw-r--r--perl-install/bootloader.pm4
-rwxr-xr-xperl-install/standalone/drakboot14
2 files changed, 15 insertions, 3 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index e6428ae92..c685b86d1 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -593,6 +593,10 @@ wait %d seconds for default boot.
$bootloader->{method} = first(method_choices($fstab, $bootloader));
}
+sub detect_bootloader() {
+ chomp_(run_program::rooted_get_stdout($::prefix, 'detectloader'));
+}
+
sub method_choices {
my ($fstab, $bootloader) = @_;
my %choices = (
diff --git a/perl-install/standalone/drakboot b/perl-install/standalone/drakboot
index a83bd00c0..e75045c6b 100755
--- a/perl-install/standalone/drakboot
+++ b/perl-install/standalone/drakboot
@@ -49,7 +49,7 @@ ugtk2->import(qw(:helpers :wrappers :create));
my $no_bootsplash;
my $x_mode = Xconfig::various::runlevel() == 5;
my $auto_mode = any::get_autologin();
-my $lilogrub = chomp_(`detectloader -q`);
+my $lilogrub = bootloader::detect_bootloader();
my $w = ugtk2->new(N("Boot Style Configuration"));
my $window = $w->{window};
@@ -239,8 +239,7 @@ gtkadd($window,
gtkadd(new Gtk2::Frame($disp_mode),
# gtkpack__(new Gtk2::VBox(0,0),
(gtkpack_(gtkset_border_width(new Gtk2::HBox(0, 0),5),
- 1, N("You are currently using %s as your boot manager.
-Click on Configure to launch the setup wizard.", $lilogrub),
+ 1, my $boot_label = Gtk2::Label->new(""),
0, gtksignal_connect(new Gtk2::Button(N("Configure")), clicked => \&lilo_choice),
)),
# "" #we need some place under the button -- replaced by gtkset_border_width( for the moment
@@ -306,10 +305,18 @@ $x_box->set_sensitive($x_mode);
$auto_box->set_sensitive($auto_mode->{autologin} ? 1 : 0);
$window->show_all();
$no_bootsplash and $thm_frame->hide();
+update_bootloader_label($lilogrub);
gtkflush();
$w->main;
$in->exit(0);
+
+sub update_bootloader_label {
+ my ($bootloader) = @_;
+ $boot_label->set_label(N("You are currently using %s as your boot manager.
+Click on Configure to launch the setup wizard.", $bootloader));
+}
+
sub lilo_choice() {
my $bootloader = bootloader::read();
@@ -329,6 +336,7 @@ sub lilo_choice() {
[ N("Installation of %s failed. The following error occured:", $loader), $err ]);
goto ask;
}
+ update_bootloader_label(bootloader::detect_bootloader());
}