Bug#261936: Patch to grub to make update-grub detect and handle splash images

Nathaniel McCallum Nathaniel McCallum <npmccallum@gentoo.org>, 261936@bugs.debian.org
Wed, 28 Jul 2004 21:15:26 -0400


On Thu, 2004-07-29 at 11:00 +1000, Jason Thomas wrote:
> will that work, I thought that the grub device needed to be specified!
> 
> http://ruslug.rutgers.edu/~mcgrof/grub-images/
> 
> 1.1 I have my image, now what?
> 
>     1. Gzip your xpm file and put it into your /boot/GRUB directory (or to any directory of a /dev/hda1 partition). (do: `gzip myfile.xpm`)
>     2. Edit your GRUB config file (aka /etc/GRUB.conf) and add this line:
>     splashimage=(hd0,0)/GRUB/myfile.xpm.gz
>     NOTE: Change the partition and directory according to your system's setup.
>     3. reboot and cross your fingers
> 

Sorry, I uploaded an older version of the patch.  This should work.

diff -Nru grub-0.95+cvs20040624.old/debian/update-grub grub-0.95
+cvs20040624/debian/update-grub
--- grub-0.95+cvs20040624.old/debian/update-grub        2004-07-28
20:02:46.000000000 -0400
+++ grub-0.95+cvs20040624/debian/update-grub    2004-07-28
20:00:59.000000000 -0400
@@ -640,6 +640,15 @@
 echo "## ## End Default Options ##" >> $buffer
 echo >> $buffer

+echo -n "Searching for splash image... "
+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
+else
+       echo "none found, skipping..."
+fi
+
 sortedKernels=""
 for kern in $(/bin/ls -1vr /boot/vmlinuz-*) ; do
        # found a kernel