summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-03-26 13:51:15 +0000
committerFrancois Pons <fpons@mandriva.com>2003-03-26 13:51:15 +0000
commitf88f2f40f8acf8b315bed113848ba1c985794c82 (patch)
tree0bd2e4d3ee3e101a0dc834c7dc70b99d02d0166e /perl-install
parentc7ac7298e2170578552707173dde3721dc1e335e (diff)
downloaddrakx-backup-do-not-use-f88f2f40f8acf8b315bed113848ba1c985794c82.tar
drakx-backup-do-not-use-f88f2f40f8acf8b315bed113848ba1c985794c82.tar.gz
drakx-backup-do-not-use-f88f2f40f8acf8b315bed113848ba1c985794c82.tar.bz2
drakx-backup-do-not-use-f88f2f40f8acf8b315bed113848ba1c985794c82.tar.xz
drakx-backup-do-not-use-f88f2f40f8acf8b315bed113848ba1c985794c82.zip
fix typo on grub menu file read.
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/bootloader.pm17
1 files changed, 17 insertions, 0 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index bc3ae3319..2331579d9 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -497,6 +497,23 @@ wait %d seconds for default boot.
any::set_login_serial_console($port, $speed);
}
+ #- add a restore entry if installation is done from disk, in order to allow redoing it.
+ if (my $hd_install_path = any::hdInstallPath()) {
+ if (-e "$hd_install_path/boot/vmlinuz" && -e "$hd_install_path/boot/all.rdz" and
+ my ($cmdline) = cat_("$hd_install_path/boot/menu.lst") =~ /kernel \S+\/boot\/vmlinuz (.*)$/) {
+ log::l("adding a restore bootloader entry on $hd_install_path");
+ add_entry($bootloader, {
+ type => 'image',
+ label => 'restore',
+ kernel_or_dev => "$hd_install_path/boot/vmlinuz",
+ initrd => "$hd_install_path/boot/all.rdz",
+ append => $cmdline,
+ });
+ } else {
+ log::l("no restore bootloader need to be used");
+ }
+ }
+
my %labels = get_kernels_and_labels();
$labels{''} or die "no kernel installed";