linux-base: Don't quote boot device name in elilo.conf

(Closes: #580710; works-around: #581173)

svn path=/dists/sid/linux-2.6/; revision=15662
This commit is contained in:
Ben Hutchings 2010-05-12 00:10:49 +00:00
parent 68f84c6968
commit 25d95287fa
2 changed files with 23 additions and 4 deletions

2
debian/changelog vendored
View File

@ -21,6 +21,8 @@ linux-2.6 (2.6.32-13) UNRELEASED; urgency=low
[ Ben Hutchings ]
* linux-base: Fix typo in disk relabelling code (Closes: #580467)
* linux-base: Don't quote boot device name in elilo.conf
(Closes: #580710; works-around: #581173)
* rtl8192su: Add IDs for several more devices (Closes: #580740)
[ Aurelien Jarno ]

View File

@ -499,8 +499,8 @@ sub lilo_list {
return @bdevs;
}
sub lilo_update {
my ($old, $new, $map) = @_;
sub _lilo_update {
my ($old, $new, $map, $replace) = @_;
my @tokens = lilo_tokenize($old);
my $i = 0;
my $in_generic = 1; # global or image=/vmlinuz or image=/vmlinuz.old
@ -533,7 +533,8 @@ sub lilo_update {
}
if (defined($new_value)) {
$new_value =~ s/\\/\\\\/g;
$text = "\n# $name = $value\n$name = \"$new_value\"\n";
$text = &{$replace}($name, $value, $new_value) ||
"\n# $name = $value\n$name = \"$new_value\"\n";
} else {
$text .= $tokens[$i + 1][0] . $tokens[$i + 2][0];
}
@ -546,6 +547,11 @@ sub lilo_update {
}
}
sub lilo_update {
my ($old, $new, $map) = @_;
_lilo_update($old, $new, $map, sub { return undef });
}
sub lilo_post {
_system('lilo');
}
@ -558,6 +564,17 @@ sub silo_post {
### ELILO
sub elilo_update {
my ($old, $new, $map) = @_;
# Work around bug #581173 - boot value must have no space before
# and no quotes around it.
sub replace {
my ($name, $value, $new_value) = @_;
return ($name eq 'boot') ? "# boot=$value\nboot=$new_value\n" : undef;
}
_lilo_update($old, $new, $map, \&replace);
}
sub elilo_post {
_system('elilo');
}
@ -970,7 +987,7 @@ my @config_files = ({packages => 'mount',
{packages => 'elilo',
path => '/etc/elilo.conf',
list => \&lilo_list,
update => \&lilo_update,
update => \&elilo_update,
post_update => \&elilo_post,
is_boot_loader => 1},
{packages => 'extlinux',