summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-10-27 08:15:51 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-10-27 08:15:51 +0000
commita3989b83e00b151543953e96886fde51532055f0 (patch)
treede2f97e78e4c6e09250e35f4698ea9c1b1dd8d99 /perl-install
parent5128098cfcb38bfafc05e466ca0fb374166b509b (diff)
downloaddrakx-a3989b83e00b151543953e96886fde51532055f0.tar
drakx-a3989b83e00b151543953e96886fde51532055f0.tar.gz
drakx-a3989b83e00b151543953e96886fde51532055f0.tar.bz2
drakx-a3989b83e00b151543953e96886fde51532055f0.tar.xz
drakx-a3989b83e00b151543953e96886fde51532055f0.zip
many kernel parameters alike "console=tty0 console=ttyS0,57600" can take
different values, so we now take the safe side and only remove dups for parameters we know the last parameter is used (bugzilla #12055)
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/bootloader.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 31bb13665..4b3cfddf0 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -484,6 +484,8 @@ sub duplicate_kernel_entry {
add_entry($bootloader, $entry);
}
+my $uniq_dict_appends = join('|', qw(devfs acpi pci resume PROFILE XFree));
+
sub unpack_append {
my ($s) = @_;
my @l = split(' ', $s);
@@ -494,7 +496,10 @@ sub pack_append {
#- normalize
$simple = [ reverse(uniq(reverse @$simple)) ];
- $dict = [ reverse(uniq_ { my ($k, $v) = @$_; $k eq 'mem' ? "$k=$v" : $k } reverse @$dict) ];
+ $dict = [ reverse(uniq_ {
+ my ($k, $v) = @$_;
+ $k =~ /^($uniq_dict_appends)$/ ? $k : "$k=$v";
+ } reverse @$dict) ];
join(' ', @$simple, map { "$_->[0]=$_->[1]" } @$dict);
}