Bug#409190: update-grub writes to stdout, breaks kernel postrm

Chip Salzenberg chip at pobox.com
Wed Jan 31 18:14:52 UTC 2007


Package: grub
Version: 0.97-21
Severity: important

Since update-grub writes to stdout, it breaks the debconf integration
of the kernel postrm scripts, rendering kernels impossible to remove.

Here is an (untested) patch.

--- /usr/sbin/update-grub.old	2007-01-14 17:16:52.000000000 -0800
+++ /usr/sbin/update-grub	2007-01-31 10:10:01.000000000 -0800
@@ -394,9 +394,9 @@
 ## End Configuration Options
 
-echo -n "Searching for default file ... "
+echo -n "Searching for default file ... " >&2
 if [ -f "$default_file" ] ; then
-  echo "found:" $default_file
+  echo "found: $default_file" >&2
 else
-  echo "Generating $default_file file and setting the default boot entry to 0"
+  echo "Generating $default_file file and setting the default boot entry to 0" >&2
   grub-set-default 0
 fi
@@ -1009,5 +1009,5 @@
 			found=1
 
-			echo "Found Xen hypervisor $hypervisorVersion,  kernel: $kernel"
+			echo "Found Xen hypervisor $hypervisorVersion,  kernel: $kernel" >&2
 
 			write_kernel_entry "$kernelVersion" '' '' "$grub_root_device" \
@@ -1021,5 +1021,5 @@
 			hypVersion=`basename "$hypervisor" .gz | sed s%xen-%%`
 		
-			echo "Found Xen hypervisor $hypVersion,  kernel: $kernel"
+			echo "Found Xen hypervisor $hypVersion,  kernel: $kernel" >&2
 
 			write_kernel_entry "$kernelVersion" '' '' "$grub_root_device" \


-- System Information:
Debian Release: 4.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-686
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages grub depends on:
ii  libc6                       2.3.6.ds1-10 GNU C Library: Shared libraries
ii  libncurses5                 5.5-5        Shared libraries for terminal hand

grub recommends no packages.

-- no debconf information




More information about the Pkg-grub-devel mailing list