summaryrefslogtreecommitdiffstats
path: root/perl-install/any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-08-18 09:02:42 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-08-18 09:02:42 +0000
commit4f7197a536b57f1ff65e5e6f5cc4e0b9cbc28824 (patch)
tree8acc7660ebc279b85c9cf27362e8d0410cecd36e /perl-install/any.pm
parent5f505f676af457ac8e248b1b245706a35feb2ba5 (diff)
downloaddrakx-4f7197a536b57f1ff65e5e6f5cc4e0b9cbc28824.tar
drakx-4f7197a536b57f1ff65e5e6f5cc4e0b9cbc28824.tar.gz
drakx-4f7197a536b57f1ff65e5e6f5cc4e0b9cbc28824.tar.bz2
drakx-4f7197a536b57f1ff65e5e6f5cc4e0b9cbc28824.tar.xz
drakx-4f7197a536b57f1ff65e5e6f5cc4e0b9cbc28824.zip
- any::setupBootloader() used to call bootloader::install() whereas install_steps_interactive::setupBootloader() could call it once again (but this code seems dead though)
- create any::installBootloader() out of what was done in the end of any::setupBootloader() but also in install_steps_interactive and drakboot (which handled the error that could occur in bootloader::install())
Diffstat (limited to 'perl-install/any.pm')
-rw-r--r--perl-install/any.pm27
1 files changed, 22 insertions, 5 deletions
diff --git a/perl-install/any.pm b/perl-install/any.pm
index df244b8ff..c7fcea887 100644
--- a/perl-install/any.pm
+++ b/perl-install/any.pm
@@ -101,15 +101,32 @@ sub setupBootloader {
local $::Wizard_finished = 1 if $::isStandalone;
setupBootloader__entries($in, $b, $all_hds, $fstab) or goto general;
}
+}
- #- somewhere should bootloader really installed ?
- $::isStandalone and my $_w = $in->wait_message(N("Please wait"), N("Bootloader installation in progress"));
+sub installBootloader {
+ my ($in, $b, $all_hds) = @_;
- eval { run_program::rooted($::prefix, 'lilo', '-u') } if $::isInstall && !$::o->{isUpgrade} && -e "$::prefix/etc/lilo.conf" && glob("$::prefix/boot/boot.*");
+ install_acpi_pkgs($in, $b);
+
+ my $_w = $in->wait_message(N("Please wait"), N("Bootloader installation in progress"));
- install_acpi_pkgs($in->do_pkgs, $b);
+ eval { run_program::rooted($::prefix, 'lilo', '-u') } if $::isInstall && !$::o->{isUpgrade} && -e "$::prefix/etc/lilo.conf" && glob("$::prefix/boot/boot.*");
- bootloader::install($b, $all_hds);
+ eval { bootloader::install($b, $all_hds) };
+
+ if (my $err = $@) {
+ $err =~ /wizcancel/ and return;
+ $err =~ s/^\w+ failed// or die;
+ $err = formatError($err);
+ while ($err =~ s/^Warning:.*//m) {}
+ $o->ask_warn('', [ N("Installation of bootloader failed. The following error occured:"), $err ]);
+ return;
+ } elsif (arch() =~ /ppc/) {
+ my $of_boot = cat_("$o->{prefix}/tmp/of_boot_dev") || die "Can't open $o->{prefix}/tmp/of_boot_dev";
+ chop($of_boot);
+ $o->ask_warn('', N("You may need to change your Open Firmware boot-device to\n enable the bootloader. If you don't see the bootloader prompt at\n reboot, hold down Command-Option-O-F at reboot and enter:\n setenv boot-device %s,\\\\:tbxi\n Then type: shut-down\nAt your next boot you should see the bootloader prompt.", $of_boot));
+ }
+ 1;
}