diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2005-04-27 14:33:54 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2005-04-27 14:33:54 +0000 |
commit | 7170580a952e47fe0c72a74c951063628656ba6d (patch) | |
tree | 3d5f7617c1ebe652dbcf26aedeb8c9240f662911 /perl-install | |
parent | e7f39a48a82649e77f8437d390da107914e67fe4 (diff) | |
download | drakx-backup-do-not-use-7170580a952e47fe0c72a74c951063628656ba6d.tar drakx-backup-do-not-use-7170580a952e47fe0c72a74c951063628656ba6d.tar.gz drakx-backup-do-not-use-7170580a952e47fe0c72a74c951063628656ba6d.tar.bz2 drakx-backup-do-not-use-7170580a952e47fe0c72a74c951063628656ba6d.tar.xz drakx-backup-do-not-use-7170580a952e47fe0c72a74c951063628656ba6d.zip |
create install_raw_grub() and install_raw_lilo()
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/bootloader.pm | 25 |
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 |