* util/grub-mkconfig.in: Stop setting GRUB_VIDEO_BACKEND. Make it

available as a user override instead.  Replace the gfxterm backend
check with a check that ${GRUB_PREFIX}/video.lst is non-empty.
* util/grub.d/00_header.in (load_video): New generated function.
Call it before loading gfxterm rather than loading
${GRUB_VIDEO_BACKEND}.
* util/grub.d/10_linux.in (linux_entry): Call load_video.
* util/grub.d/30_os-prober.in (osx_entry): Likewise.
* docs/grub.texi (Simple configuration): Document
GRUB_VIDEO_BACKEND.
This commit is contained in:
Colin Watson 2010-06-17 16:01:17 +01:00
parent d49703d151
commit e4311a9f0f
5 changed files with 35 additions and 17 deletions

View file

@ -181,10 +181,7 @@ for x in ${GRUB_TERMINAL_OUTPUT}; do
GRUB_TERMINAL_OUTPUT=
break;
fi
# FIXME: this should do something smarter than just loading first
# video backend.
GRUB_VIDEO_BACKEND=$(head -n 1 ${GRUB_PREFIX}/video.lst || true)
if [ -z "${GRUB_VIDEO_BACKEND}" ] ; then
if [ ! -s "${GRUB_PREFIX}/video.lst" ] ; then
if [ "x$termoutdefault" != "x1" ]; then
echo "No suitable backend could be found for gfxterm." >&2 ; exit 1
fi
@ -242,7 +239,6 @@ export GRUB_DEVICE \
GRUB_FS \
GRUB_FONT_PATH \
GRUB_PRELOAD_MODULES \
GRUB_VIDEO_BACKEND \
GRUB_PREFIX
# These are optional, user-defined variables.
@ -265,6 +261,7 @@ export GRUB_DEFAULT \
GRUB_DISABLE_LINUX_UUID \
GRUB_DISABLE_LINUX_RECOVERY \
GRUB_DISABLE_NETBSD_RECOVERY \
GRUB_VIDEO_BACKEND \
GRUB_GFXMODE \
GRUB_BACKGROUND \
GRUB_THEME \