summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-01-23 18:40:13 +0000
committerFrancois Pons <fpons@mandriva.com>2002-01-23 18:40:13 +0000
commit985a95ed0b0b3591d9d7c7aac69ec2a2ecae06ba (patch)
treedc4c6e23d6ce9b2bee685675a1089eb384302a2b
parent2d94072c44aa85b98b79e132d0d2019f5ce40035 (diff)
downloaddrakx-backup-do-not-use-985a95ed0b0b3591d9d7c7aac69ec2a2ecae06ba.tar
drakx-backup-do-not-use-985a95ed0b0b3591d9d7c7aac69ec2a2ecae06ba.tar.gz
drakx-backup-do-not-use-985a95ed0b0b3591d9d7c7aac69ec2a2ecae06ba.tar.bz2
drakx-backup-do-not-use-985a95ed0b0b3591d9d7c7aac69ec2a2ecae06ba.tar.xz
drakx-backup-do-not-use-985a95ed0b0b3591d9d7c7aac69ec2a2ecae06ba.zip
fixed to allow multiple mem=xxx parameter (especially mem=nopentium).
-rw-r--r--perl-install/bootloader.pm8
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);