diff --git a/debian/changelog b/debian/changelog index 09c230316..fbff94578 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 ] diff --git a/debian/linux-base.postinst b/debian/linux-base.postinst index 77bf327f6..e932f6b8c 100644 --- a/debian/linux-base.postinst +++ b/debian/linux-base.postinst @@ -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',