* grub.d/05_debian_theme: Only setup background image when a reader for it

is present in /boot/grub.  (Closes: #467111)
This commit is contained in:
rmh 2008-02-24 15:13:18 +00:00
parent 1ae4ddb1ec
commit 5909d47a84
2 changed files with 12 additions and 8 deletions

2
debian/changelog vendored
View File

@ -2,6 +2,8 @@ grub2 (1.96+20080219-3) unstable; urgency=low
* default/grub: Use lsb_release to support Debian derivatives.
(Closes: #466561)
* grub.d/05_debian_theme: Only setup background image when a reader for it
is present in /boot/grub. (Closes: #467111)
-- Robert Millan <rmh@aybabtu.com> Sun, 24 Feb 2008 15:39:50 +0100

View File

@ -16,20 +16,22 @@ use_bg=false
if [ "$GRUB_TERMINAL" = "gfxterm" ] ; then
for i in {/usr/share/images/desktop-base,/boot/grub}/debian-blueish-wallpaper-640x480.{png,tga} ; do
if bg=`convert_system_path_to_grub_path $i` ; then
echo "Found Debian background: `basename ${bg}`" >&2
use_bg=true
break
case ${bg} in
*.png) reader=png ;;
*.tga) reader=tga ;;
*.jpg|*.jpeg) reader=jpeg ;;
esac
if test -e /boot/grub/${reader}.mod ; then
echo "Found Debian background: `basename ${bg}`" >&2
use_bg=true
break
fi
fi
done
fi
# set the background if possible
if ${use_bg} ; then
case ${bg} in
*.png) reader=png ;;
*.tga) reader=tga ;;
*.jpg|*.jpeg) reader=jpeg ;;
esac
cat << EOF
insmod ${reader}
if background_image ${bg} ; then