Bug#280086: A new patch to support byhand changes in splashimage= param

Otavio Salvador Otavio Salvador <otavio@debian.org>, 280086@bugs.debian.org
Wed, 26 Jan 2005 02:04:29 -0200


This is a multi-part MIME message sent by reportbug.

--===============0844861568==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: grub
Version: 0.95+cvs20040624-13
Followup-For: Bug #280086

Hello,

I'm using grub for a lot of machines and it's also used by
Debian-BR-CDD[1] project as well. One of our users is affected by this
bug and then I tried to found one possible solution. I'm attaching a
new patch to preserv byhand changes.

Please, apply it ASAP since it's very easy to be affected by this bug.

-- System Information:
Debian Release: 3.1
  APT prefers unstable
  APT policy: (900, 'unstable'), (700, 'experimental')
Architecture: i386 (i686)
Kernel: Linux 2.6.10-1-k7
Locale: LANG=pt_BR, LC_CTYPE=pt_BR (charmap=ISO-8859-1)

Versions of packages grub depends on:
ii  libc6                       2.3.2.ds1-20 GNU C Library: Shared libraries an
ii  libncurses5                 5.4-4        Shared libraries for terminal hand

-- no debconf information

--===============0844861568==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="update-grub.patch"

674,677c674,682
< if [ -f /boot/grub/splash.xpm.gz ]; then
<        echo "found: /boot/grub/splash.xpm.gz ."
<        echo "splashimage=${grub_root_device}${grub_dir}/splash.xpm.gz" >> $buffer
<        echo >> $buffer
---
> entry="splashimage=${grub_root_device}${grub_dir##${boot_device:+/boot}}/splash.xpm.gz"
> if [ -f /boot/grub/splash.xpm.gz ] && ! grep -q '^splashimage=' /boot/grub/menu.lst; then
> 	echo "found: /boot/grub/splash.xpm.gz ."
> 	echo "$entry" >> $buffer
> 	echo >> $buffer
> elif [ "$(grep '^splashimage=' /boot/grub/menu.lst)" != "$entry" ]; then
>     echo "found but preserving previous setting: $(grep '^splashimage=' /boot/grub/menu.lst)"
>     grep "^splashimage=" /boot/grub/menu.lst >> $buffer
>     echo >> $buffer

--===============0844861568==--