diff options
author | Francois Pons <fpons@mandriva.com> | 2002-01-23 18:40:13 +0000 |
---|---|---|
committer | Francois Pons <fpons@mandriva.com> | 2002-01-23 18:40:13 +0000 |
commit | 985a95ed0b0b3591d9d7c7aac69ec2a2ecae06ba (patch) | |
tree | dc4c6e23d6ce9b2bee685675a1089eb384302a2b | |
parent | 2d94072c44aa85b98b79e132d0d2019f5ce40035 (diff) | |
download | drakx-985a95ed0b0b3591d9d7c7aac69ec2a2ecae06ba.tar drakx-985a95ed0b0b3591d9d7c7aac69ec2a2ecae06ba.tar.gz drakx-985a95ed0b0b3591d9d7c7aac69ec2a2ecae06ba.tar.bz2 drakx-985a95ed0b0b3591d9d7c7aac69ec2a2ecae06ba.tar.xz drakx-985a95ed0b0b3591d9d7c7aac69ec2a2ecae06ba.zip |
fixed to allow multiple mem=xxx parameter (especially mem=nopentium).
-rw-r--r-- | perl-install/bootloader.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index 366223713..736ee60ec 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -189,7 +189,11 @@ sub add_append { my ($b, $key, $val) = @_; foreach (\$b->{perImageAppend}, map { \$_->{append} } @{$b->{entries}}) { - $$_ =~ s/\b$key=\S*\s*//; + if ($key eq 'mem') { + $$_ =~ s/\bmem=(\d+[KkMm]?)(\s.*)?$/$2/; + } else { + $$_ =~ s/\b$key=\S*\s*//; + } $$_ =~ s/\s*$/ $key=$val/ if $val; log::l("add_append: $$_"); } @@ -335,7 +339,7 @@ wait %d seconds for default boot. } } - add2hash_($lilo, { memsize => $1 }) if cat_("/proc/cmdline") =~ /mem=(\S+)/; + add2hash_($lilo, { memsize => $1 }) if cat_("/proc/cmdline") =~ /\bmem=(\d+[KkMm]?)(?:\s.*)?$/; if (my ($s, $port, $speed) = cat_("/proc/cmdline") =~ /console=(ttyS(\d),(\d+)\S*)/) { log::l("serial console $s $port $speed"); add_append($lilo, 'console' => $s); |