Bug#310030: update-grub generates trailing white space
Martin Michlmayr
Martin Michlmayr <tbm@cyrius.com>, 310030@bugs.debian.org
Sat, 21 May 2005 07:45:32 +0100
Package: grub
Version: 0.95+cvs20040624-17
Severity: minor
Tags: patch
upgrade-grub generates trailing whitespace in the title (and kernel)
options. This is kinda ugly because GRUB prints something like
Booting '$title'
during start-up and the trailing white-space is part of $title so
something like
Booting 'foo '
is displayed, which looks ugly.
Here's a patch.
--- /sbin/update-grub 2005-04-19 00:38:00.000000000 +0100
+++ ./update-grub 2005-05-21 07:42:58.177801136 +0100
@@ -535,7 +535,11 @@
initrd=$8
savedefault=$9
- echo "title Debian GNU/Linux, kernel $kernel_version $recovery_desc" >> $buffer
+ echo -n "title Debian GNU/Linux, kernel $kernel_version" >> $buffer
+ if [ -n "$recovery_desc" ]; then
+ echo -n " $recovery_desc" >> $buffer
+ fi
+ echo >> $buffer
# lock the alternative options
if test x"$lock_alternative" = x"true" ; then
@@ -543,7 +547,11 @@
fi
echo "root $grub_root_device" >> $buffer
- echo "kernel $kernel $kernel_options $recovery_suffix" >> $buffer
+ echo -n "kernel $kernel $kernel_options" >> $buffer
+ if [ -n "$recovery_desc" ]; then
+ echo -n " $recovery_suffix" >> $buffer
+ fi
+ echo >> $buffer
if [ -n "$initrd" ]; then
echo "initrd $initrd" >> $buffer
-- System Information:
Debian Release: 3.1
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.10-1-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Versions of packages grub depends on:
ii libc6 2.3.2.ds1-22 GNU C Library: Shared libraries an
ii libncurses5 5.4-4 Shared libraries for terminal hand
-- no debconf information
--
Martin Michlmayr
http://www.cyrius.com/