Source: linux-2.6 Version: 2.6.32-12 Severity: serious Tags: patch /usr/sbin/elilo didn't like the converted elilo.conf because it doesn't support quoted strings, or spaces around '='.
Instead of: boot = "/dev/disk/by-uuid/9C73-E0C3" it needs: boot=/dev/disk/by-uuid/9C73-E0C3 The following patch fixes it, but it is pretty ugly. I would've preferred to use the line that is commented out, but when I do I get an extraneous newline both before and after the newly inserted line. I assume this is due to how things are tokenized (I'm not enough of a perl guy to grok it). Also, it has a cosmetic issue where we lose the tab indention in stanzas. We go from this: image=/vmlinuz.old label=LinuxOLD root=/dev/sda2 read-only initrd=/initrd.img.old To this: image=/vmlinuz.old label=LinuxOLD # root=/dev/sda2 root=UUID=170d52c1-c568-4bad-aass-be4248ad1af4 read-only initrd=/initrd.img.old (Now to reboot, to make sure it actually works...) -- dann frazier
Index: debian/linux-base.postinst =================================================================== --- debian/linux-base.postinst (revision 15638) +++ debian/linux-base.postinst (working copy) @@ -499,8 +499,8 @@ return @bdevs; } -sub lilo_update { - my ($old, $new, $map) = @_; +sub do_lilo_update { + my ($old, $new, $map, $simple_assign) = @_; my @tokens = lilo_tokenize($old); my $i = 0; my $in_generic = 1; # global or image=/vmlinuz or image=/vmlinuz.old @@ -533,7 +533,12 @@ } if (defined($new_value)) { $new_value =~ s/\\/\\\\/g; - $text = "\n# $name = $value\n$name = \"$new_value\"\n"; + if ($simple_assign) { + $text = "\n# $name = $value\n$name = \"$new_value\"\n"; + } else { +# $text = "\n# $name=$value\n$name=$new_value\n"; + $text = "# $name=$value\n$name=$new_value"; + } } else { $text .= $tokens[$i + 1][0] . $tokens[$i + 2][0]; } @@ -546,6 +551,13 @@ } } +sub lilo_update { + my ($old, $new, $map) = @_; + my $simple_assign = 1; + + do_lilo_update($old, $new, $map, $simple_assign); +} + sub lilo_post { _system('lilo'); } @@ -558,6 +570,13 @@ ### ELILO +sub elilo_update { + my ($old, $new, $map) = @_; + my $simple_assign = 0; + + do_lilo_update($old, $new, $map, $simple_assign); +} + sub elilo_post { _system('elilo'); } @@ -970,7 +989,7 @@ {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',