summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-04-27 14:33:54 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-04-27 14:33:54 +0000
commit7170580a952e47fe0c72a74c951063628656ba6d (patch)
tree3d5f7617c1ebe652dbcf26aedeb8c9240f662911 /perl-install/bootloader.pm
parente7f39a48a82649e77f8437d390da107914e67fe4 (diff)
downloaddrakx-7170580a952e47fe0c72a74c951063628656ba6d.tar
drakx-7170580a952e47fe0c72a74c951063628656ba6d.tar.gz
drakx-7170580a952e47fe0c72a74c951063628656ba6d.tar.bz2
drakx-7170580a952e47fe0c72a74c951063628656ba6d.tar.xz
drakx-7170580a952e47fe0c72a74c951063628656ba6d.zip
create install_raw_grub() and install_raw_lilo()
Diffstat (limited to 'perl-install/bootloader.pm')
-rw-r--r--perl-install/bootloader.pm25
1 files changed, 16 insertions, 9 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 0e2b7a010..40c82f5c8 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -1129,14 +1129,19 @@ sub install_lilo {
when_config_changed_lilo($bootloader);
}
+sub install_raw_lilo {
+ my ($o_force_answer) = @_;
+
+ my $error;
+ my $answer = $o_force_answer || '';
+ run_program::rooted($::prefix, "echo $answer | lilo", '2>', \$error) or die "lilo failed: $error";
+}
+
sub when_config_changed_lilo {
my ($bootloader) = @_;
-
if (!$::testing && arch() !~ /ia64/ && $bootloader->{method} =~ /lilo/) {
log::l("Installing boot loader on $bootloader->{boot}...");
- my $error;
- my $answer = $bootloader->{force_lilo_answer} || '';
- run_program::rooted($::prefix, "echo $answer | lilo", '2>', \$error) or die "lilo failed: $error";
+ install_raw_lilo($bootloader->{force_lilo_answer});
}
}
@@ -1322,12 +1327,14 @@ sub install_grub {
write_grub($bootloader, $all_hds);
- if (!$::testing) {
- log::l("Installing boot loader...");
- my $error;
- run_program::rooted($::prefix, "sh", '/boot/grub/install.sh', "2>", \$error) or die "grub failed: $error";
- }
+ install_raw_grub() if !$::testing;
}
+sub install_raw_grub() {
+ log::l("Installing boot loader...");
+ my $error;
+ run_program::rooted($::prefix, "sh", '/boot/grub/install.sh', "2>", \$error) or die "grub failed: $error";
+}
+
sub when_config_changed_grub {
my ($_bootloader) = @_;
#- do not do anything