From 728fe7b3972fd51a90bafec8576b6ac2ff2ed8c2 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Sat, 15 Sep 2001 18:04:01 +0000 Subject: find error in /tmp/.error only if exception is "xxx failed" --- perl-install/bootloader.pm | 7 +++---- perl-install/install_steps_interactive.pm | 3 ++- perl-install/steps.pm | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'perl-install') diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 49d8ee5fc..4929ee59b 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -538,7 +538,7 @@ sub install_yaboot($$$) { if (defined $install_steps_interactive::new_bootstrap) { run_program::run("hformat", "$lilo->{boot}") or die "hformat failed"; } - run_program::rooted($prefix, "/sbin/ybin", "2>", "/tmp/.error") or die "ybin failed"; + run_program::rooted_or_die($prefix, "/sbin/ybin", "2>", "/tmp/.error"); unlink "$prefix/tmp/.error"; } @@ -607,8 +607,7 @@ sub install_silo($$$) { log::l("Installing boot loader..."); $::testing and return; run_program::rooted($prefix, "silo", "2>", "/tmp/.error", $silo->{use_partition} ? ("-t") : ()) or - run_program::rooted($prefix, "silo", "2>", "/tmp/.error", "-p", "2", $silo->{use_partition} ? ("-t") : ()) or - die "silo failed"; + run_program::rooted_or_die($prefix, "silo", "2>", "/tmp/.error", "-p", "2", $silo->{use_partition} ? ("-t") : ()); unlink "$prefix/tmp/.error"; #- try writing in the prom. @@ -863,7 +862,7 @@ sub install_grub { log::l("Installing boot loader..."); $::testing and return; symlink "$prefix/boot", "/boot"; - run_program::run("sh", $f) or die "grub installation failed"; + run_program::run_or_die("sh", $f); unlink "$prefix/tmp/.error.grub", "/boot"; } diff --git a/perl-install/install_steps_interactive.pm b/perl-install/install_steps_interactive.pm index e53ec8c5b..41356adc2 100644 --- a/perl-install/install_steps_interactive.pm +++ b/perl-install/install_steps_interactive.pm @@ -1066,7 +1066,8 @@ try to force installation even if that destroys the first partition?")); my $w = $o->wait_message('', _("Installing bootloader")); eval { $o->SUPER::setupBootloader }; } - if ($@) { + if ($err = $@) { + $err =~ /failed$/ or die; $o->ask_warn('', [ _("Installation of bootloader failed. The following error occured:"), grep { !/^Warning:/ } cat_("$o->{prefix}/tmp/.error") ]); diff --git a/perl-install/steps.pm b/perl-install/steps.pm index 2efaeccf3..8997210a6 100644 --- a/perl-install/steps.pm +++ b/perl-install/steps.pm @@ -29,7 +29,7 @@ use common; if_((arch() !~ /alpha/) && (arch() !~ /ppc/), createBootdisk => [ __("Create a bootdisk"), 1, 0, '', "installPackages", 'bootdisk' ], ), - setupBootloader => [ __("Install bootloader"), 1, 1, '', "installPackages", 'bootloader' ], + setupBootloader => [ __("Install bootloader"), 1, 0, '', "installPackages", 'bootloader' ], configureX => [ __("Configure X"), 1, 1, '', ["formatPartitions", "setupBootloader"], 'X' ], exitInstall => [ __("Exit install"), 0, 0, '!$::expert && !$::live', '', 'exit' ], ); -- cgit v1.2.1