]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
grub-mkconfig support for themes
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 5 Jan 2010 20:24:33 +0000 (21:24 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 5 Jan 2010 20:24:33 +0000 (21:24 +0100)
util/grub-mkconfig.in
util/grub.d/00_header.in

index 49e52b3136351fe2d1a039cd796591d668ad47ff..7e667fb3e6588da50e316713fc1ebf3899367edd 100644 (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
index 0adfe6b76fefffb2c3894a530063b1ca26ef134d..da394783aba59563da4526f4f1a2da2ee7847d38 100644 (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
   ;;