summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2007-11-26 12:03:20 +0000
committerPascal Rigaux <pixel@mandriva.com>2007-11-26 12:03:20 +0000
commite7bc843e44a06483260007c1f5bf5d62d20a314c (patch)
treea51f5db76016034ac517c508432f498679d571cf
parent21faaaeedcf6554ae72e47ce58df2a680197dc1c (diff)
downloaddrakx-backup-do-not-use-e7bc843e44a06483260007c1f5bf5d62d20a314c.tar
drakx-backup-do-not-use-e7bc843e44a06483260007c1f5bf5d62d20a314c.tar.gz
drakx-backup-do-not-use-e7bc843e44a06483260007c1f5bf5d62d20a314c.tar.bz2
drakx-backup-do-not-use-e7bc843e44a06483260007c1f5bf5d62d20a314c.tar.xz
drakx-backup-do-not-use-e7bc843e44a06483260007c1f5bf5d62d20a314c.zip
keep grub "root" command with field name {grub_root}
(to avoid name conflict with {root} used for the root partition (think lilo)) this commit is needed by next commit
-rw-r--r--perl-install/bootloader.pm12
1 files changed, 8 insertions, 4 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index ba69f00e9..0e328c7b4 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -245,6 +245,11 @@ sub read_grub_menu_lst {
my ($keyword, $v) = split('[ \t=]+', $_, 2) or
warn qq(unknown line in /boot/grub/menu.lst: "$_"\n), next;
+ if ($keyword eq 'root') {
+ #- rename to avoid name conflict
+ $keyword = 'grub_root';
+ }
+
if ($keyword eq 'title') {
push @{$b{entries}}, $e = { label => $v };
$global = 0;
@@ -254,10 +259,9 @@ sub read_grub_menu_lst {
if ($keyword eq 'kernel') {
$e->{type} = 'image';
$e->{kernel} = $v;
- } elsif ($keyword eq 'root' || $keyword eq 'rootnoverify') {
+ } elsif ($keyword eq 'chainloader') {
$e->{type} = 'other';
- $e->{grub_noverify} = 1 if $keyword eq 'rootnoverify';
- $e->{kernel_or_dev} = grub2dev($v, $grub2dev);
+ $e->{kernel_or_dev} = grub2dev($e->{rootnoverify} || $e->{grub_root}, $grub2dev);
$e->{append} = "";
} elsif ($keyword eq 'initrd') {
$e->{initrd} = grub2file($v, $grub2dev, $fstab);
@@ -1612,7 +1616,7 @@ sub write_grub {
next;
}
push @conf, $title;
- push @conf, join(' ', $entry->{grub_noverify} ? 'rootnoverify' : 'root', $dev);
+ push @conf, join(' ', $entry->{rootnoverify} ? 'rootnoverify' : 'root', $dev);
if ($entry->{table}) {
if (my $hd = fs::get::device2part($entry->{table}, \@sorted_hds)) {