From d5dee1f5399b4310e7010f8fe9e3ff3856960f69 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 13 Sep 2005 10:42:17 +0000 Subject: - rename readBootloaderConfigBeforeInstall() to read_bootloader_config() - call read_bootloader_config() after installing packages (for the case of grub scripts fixing the configuration, ie creating device.map and install.sh) --- perl-install/install_steps.pm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index daedce231..45ce83191 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -369,7 +369,7 @@ sub upgrading_redhat() { sub beforeInstallPackages { my ($o) = @_; - readBootloaderConfigBeforeInstall($o); + read_bootloader_config($o); #- save these files in case of upgrade failure. if ($o->{isUpgrade}) { @@ -470,6 +470,8 @@ sub installPackages { #- complete REWORK, TODO and TOCHECK! sub afterInstallPackages($) { my ($o) = @_; + read_bootloader_config($o) if $o->{isUpgrade} && is_empty_hash_ref($o->{bootloader}); + die N("Some important packages did not get installed properly. Either your cdrom drive or your cdrom is defective. Check the cdrom on an installed computer using \"rpm -qpl media/main/*.rpm\" @@ -790,11 +792,12 @@ sub addUser { } #------------------------------------------------------------------------------ -sub readBootloaderConfigBeforeInstall { +sub read_bootloader_config { my ($o) = @_; require bootloader; eval { add2hash($o->{bootloader} ||= {}, bootloader::read($o->{all_hds})) }; + $@ && $o->{isUpgrade} and log::l("read_bootloader_config failed: $@"); $o->{bootloader}{bootUnsafe} = 0 if $o->{bootloader}{boot}; #- when upgrading, do not ask where to install the bootloader (mbr vs boot partition) } -- cgit v1.2.1