diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in index 49e52b313..7e667fb3e 100644 --- a/util/grub-mkconfig.in +++ b/util/grub-mkconfig.in @@ -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 diff --git a/util/grub.d/00_header.in b/util/grub.d/00_header.in index 0adfe6b76..da394783a 100644 --- a/util/grub.d/00_header.in +++ b/util/grub.d/00_header.in @@ -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 ;;