summaryrefslogtreecommitdiffstats
path: root/perl-install/install_steps.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>1999-10-06 17:52:58 +0000
committerFrancois Pons <fpons@mandriva.com>1999-10-06 17:52:58 +0000
commitfe224251aa0fe2285b7b1eda762e5b18ddee07a0 (patch)
tree72f80085cb97c05ac1b0f264ae0e1489c4d3e953 /perl-install/install_steps.pm
parent8f7cb6dae22fc5adc6eb8c57605e16f97cfee179 (diff)
downloaddrakx-backup-do-not-use-fe224251aa0fe2285b7b1eda762e5b18ddee07a0.tar
drakx-backup-do-not-use-fe224251aa0fe2285b7b1eda762e5b18ddee07a0.tar.gz
drakx-backup-do-not-use-fe224251aa0fe2285b7b1eda762e5b18ddee07a0.tar.bz2
drakx-backup-do-not-use-fe224251aa0fe2285b7b1eda762e5b18ddee07a0.tar.xz
drakx-backup-do-not-use-fe224251aa0fe2285b7b1eda762e5b18ddee07a0.zip
*** empty log message ***
Diffstat (limited to 'perl-install/install_steps.pm')
-rw-r--r--perl-install/install_steps.pm28
1 files changed, 27 insertions, 1 deletions
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});
}