summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-05-19 08:57:20 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-05-19 08:57:20 +0000
commitd463e9a090f184f99bffdab7cde6690c7c55ffef (patch)
treec20380f862a2a991af3be0b93d8d3b7a74b7ec06
parentb54f346090d683730301de1ebeaafcb19867f16a (diff)
downloaddrakx-backup-do-not-use-d463e9a090f184f99bffdab7cde6690c7c55ffef.tar
drakx-backup-do-not-use-d463e9a090f184f99bffdab7cde6690c7c55ffef.tar.gz
drakx-backup-do-not-use-d463e9a090f184f99bffdab7cde6690c7c55ffef.tar.bz2
drakx-backup-do-not-use-d463e9a090f184f99bffdab7cde6690c7c55ffef.tar.xz
drakx-backup-do-not-use-d463e9a090f184f99bffdab7cde6690c7c55ffef.zip
- list the known bootloaders without checking the availability of the binary (useful when we don't have the root partition mounted, eg in restore_ms_boot)
- tell kdm which is the installed bootloader
-rw-r--r--perl-install/bootloader.pm29
1 files changed, 22 insertions, 7 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index bf73442f0..2f3ed23b3 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -855,13 +855,16 @@ sub method2text {
}->{$method};
}
-sub method_choices_raw() {
+sub method_choices_raw {
+ my ($b_prefix_mounted) = @_;
is_xbox() ? 'cromwell' :
arch() =~ /ppc/ ? 'yaboot' :
arch() =~ /ia64/ ? 'lilo' :
(
- if_(whereis_binary('lilo', $::prefix), 'lilo-graphic', 'lilo-menu'),
- if_(whereis_binary('grub', $::prefix), 'grub'),
+ if_(!$b_prefix_mounted || whereis_binary('lilo', $::prefix),
+ 'lilo-graphic', 'lilo-menu'),
+ if_(!$b_prefix_mounted || whereis_binary('grub', $::prefix),
+ 'grub'),
);
}
sub method_choices {
@@ -872,14 +875,15 @@ sub method_choices {
!(/lilo/ && isLoopback($root_part))
&& !(/lilo-graphic/ && detect_devices::matching_desc__regexp('ProSavageDDR'))
&& !(/grub/ && isRAID($root_part));
- } method_choices_raw();
+ } method_choices_raw(1);
}
-sub main_method_choices() {
- uniq(map { main_method($_) } method_choices_raw());
+sub main_method_choices {
+ my ($b_prefix_mounted) = @_;
+ uniq(map { main_method($_) } method_choices_raw($b_prefix_mounted));
}
sub configured_main_methods() {
my @bad_main_methods = map { if_(!$_->{content}, $_->{main_method}) } config_files();
- difference2([ main_method_choices() ], \@bad_main_methods);
+ difference2([ main_method_choices(1) ], \@bad_main_methods);
}
sub keytable {
@@ -1146,6 +1150,8 @@ sub install_lilo {
write_lilo($bootloader, $all_hds);
when_config_changed_lilo($bootloader);
+
+ configure_kdm_BootManager('Lilo');
}
sub install_raw_lilo {
@@ -1341,12 +1347,21 @@ EOF
check_enough_space();
}
+sub configure_kdm_BootManager {
+ my ($name) = @_;
+ eval { update_gnomekderc("$::prefix/usr/share/config/kdm/kdmrc", 'Shutdown' => (
+ BootManager => $name
+ )) };
+}
+
sub install_grub {
my ($bootloader, $all_hds) = @_;
write_grub($bootloader, $all_hds);
install_raw_grub() if !$::testing;
+
+ configure_kdm_BootManager('Grub');
}
sub install_raw_grub() {
log::l("Installing boot loader...");