From fe224251aa0fe2285b7b1eda762e5b18ddee07a0 Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Wed, 6 Oct 1999 17:52:58 +0000 Subject: *** empty log message *** --- perl-install/install_steps.pm | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'perl-install/install_steps.pm') diff --git a/perl-install/install_steps.pm b/perl-install/install_steps.pm index 26bb636af..37667a202 100644 --- a/perl-install/install_steps.pm +++ b/perl-install/install_steps.pm @@ -285,9 +285,35 @@ sub createBootdisk($) { } #------------------------------------------------------------------------------ -sub setupBootloaderBefore { +sub readBootloaderConfigBeforeInstall { my ($o) = @_; + my ($image, $v); add2hash($o->{bootloader} ||= {}, lilo::read($o->{prefix}, "/etc/lilo.conf")); + + #- since kernel or kernel-smp may not be upgraded, it should be checked + #- if there is a need to update existing lilo.conf entries by using that + #- hash. + my %ofpkgs = ( + 'vmlinuz' => 'kernel', + 'vmlinuz-smp' => 'kernel-smp', + ); + + #- change the /boot/vmlinuz or /boot/vmlinuz-smp entries to follow symlink. + foreach $image (keys %ofpkgs) { + if ($o->{bootloader}{entries}{"/boot/$image"} && $o->{packages}{$ofpkgs{$image}}{selected}) { + $v = readlink "$o->{prefix}/boot/$image"; + if ($v) { + $v = "/boot/$v" if $v !~ m@/@; + $o->{bootloader}{entries}{$v} = $o->{bootloader}{entries}{"/boot/$image"}; + delete $o->{bootloader}{entries}{"/boot/$image"}; + log::l("renaming /boot/$image entry by $v"); + } + } + } +} + +sub setupBootloaderBefore { + my ($o) = @_; lilo::suggest($o->{prefix}, $o->{bootloader}, $o->{hds}, $o->{fstab}, install_any::kernelVersion()); $o->{bootloader}{keytable} ||= keyboard::kmap($o->{keyboard}); } -- cgit v1.2.1