[kernel] r15662 - dists/sid/linux-2.6/debian

Ben Hutchings benh at alioth.debian.org
Wed May 12 00:11:00 UTC 2010


Author: benh
Date: Wed May 12 00:10:49 2010
New Revision: 15662

Log:
linux-base: Don't quote boot device name in elilo.conf
(Closes: #580710; works-around: #581173)

Modified:
   dists/sid/linux-2.6/debian/changelog
   dists/sid/linux-2.6/debian/linux-base.postinst

Modified: dists/sid/linux-2.6/debian/changelog
==============================================================================
--- dists/sid/linux-2.6/debian/changelog	Tue May 11 22:48:07 2010	(r15661)
+++ dists/sid/linux-2.6/debian/changelog	Wed May 12 00:10:49 2010	(r15662)
@@ -21,6 +21,8 @@
 
   [ 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 ]

Modified: dists/sid/linux-2.6/debian/linux-base.postinst
==============================================================================
--- dists/sid/linux-2.6/debian/linux-base.postinst	Tue May 11 22:48:07 2010	(r15661)
+++ dists/sid/linux-2.6/debian/linux-base.postinst	Wed May 12 00:10:49 2010	(r15662)
@@ -499,8 +499,8 @@
     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 @@
 	    }
 	    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 {
+    my ($old, $new, $map) = @_;
+    _lilo_update($old, $new, $map, sub { return undef });
+}
+
 sub lilo_post {
     _system('lilo');
 }
@@ -558,6 +564,17 @@
 
 ### 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 @@
 		    {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',



More information about the Kernel-svn-changes mailing list