# check for usable backgrounds use_bg=false if [ "$GRUB_TERMINAL_OUTPUT" = "gfxterm" ] ; then for i in /boot/grub/grub.tga ${WALLPAPER}`/boot/grub/grub.tga ${WALLPAPER} ; do if is_path_readable_by_grub $i ; then bg=$i case ${bg} in *.png) reader=png ;; *.tga) reader=tga ;; *.jpg|*.jpeg) reader=jpeg ;; esac if test -e /boot/grub/${reader}.mod ; then echo "Found background image: `basename ${bg}`" >&2 use_bg=true break fi fi done fi