grub-mkconfig support for themes

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-01-05 21:24:33 +01:00
parent be42af3884
commit eb1c959440
2 changed files with 10 additions and 0 deletions

View File

@ -220,6 +220,7 @@ export GRUB_DEFAULT \
GRUB_DISABLE_LINUX_UUID \
GRUB_DISABLE_LINUX_RECOVERY \
GRUB_GFXMODE \
GRUB_THEME \
GRUB_DISABLE_OS_PROBER
if test "x${grub_cfg}" != "x"; then

View File

@ -93,6 +93,15 @@ if loadfont `make_system_path_relative_to_its_root ${GRUB_FONT_PATH}` ; then
# understand terminal_output
terminal gfxterm
fi
EOF
if [ x$GRUB_THEME != x ] && [ -f $GRUB_THEME ] \
&& is_path_readable_by_grub $GRUB_THEME; then
echo "Found theme: $GRUB_THEME" >&2
prepare_grub_to_access_device `${grub_probe} --target=device $GRUB_THEME`
echo "insmod gfxmenu"
echo "set theme=(\$root)/`make_system_path_relative_to_its_root $GRUB_THEME`"
fi
cat << EOF
fi
EOF
;;