[2484] 2009-08-08 Felix Zielcke <[email protected]>

Felix Zielcke <[email protected]> Sat, 08 Aug 2009 06:41:55 +0000
Newsgroups gmane.comp.boot-loaders.grub.cvs
Message-ID <[email protected]>
Revision: 2484
          http://svn.sv.gnu.org/viewvc/?view=rev&root=grub&revision=2484
Author:   fzielcke
Date:     2009-08-08 06:41:54 +0000 (Sat, 08 Aug 2009)
Log Message:
-----------
2009-08-08  Felix Zielcke  <[email protected]>

	* util/grub-mkconfig.in: Allow the user to specify the used font
	with GRUB_FONT.

Modified Paths:
--------------
    trunk/grub2/ChangeLog
    trunk/grub2/util/grub-mkconfig.in

Modified: trunk/grub2/ChangeLog
===================================================================
--- trunk/grub2/ChangeLog	2009-08-08 05:58:23 UTC (rev 2483)
+++ trunk/grub2/ChangeLog	2009-08-08 06:41:54 UTC (rev 2484)
@@ -1,3 +1,8 @@
+2009-08-08  Felix Zielcke  <[email protected]>
+
+	* util/grub-mkconfig.in: Allow the user to specify the used font
+	with GRUB_FONT.
+
 2009-08-08  Pavel Roskin  <[email protected]>
 
 	* include/grub/powerpc/libgcc.h: Export __ashrdi3() if

Modified: trunk/grub2/util/grub-mkconfig.in
===================================================================
--- trunk/grub2/util/grub-mkconfig.in	2009-08-08 05:58:23 UTC (rev 2483)
+++ trunk/grub2/util/grub-mkconfig.in	2009-08-08 06:41:54 UTC (rev 2484)
@@ -154,21 +154,30 @@
 # check for terminals that require fonts
 case ${GRUB_TERMINAL_OUTPUT} in
   gfxterm)
-    for dir in ${pkgdatadir} /boot/grub /usr/share/grub ; do
-      for basename in unicode unifont ascii; do
-	path="${dir}/${basename}.pf2"
-        if is_path_readable_by_grub ${path} > /dev/null ; then
-	  GRUB_FONT_PATH=${path}
+    if [ -n "$GRUB_FONT" ] ; then
+      if is_path_readable_by_grub ${GRUB_FONT} > /dev/null ; then
+        GRUB_FONT_PATH=${GRUB_FONT}
 	else
-	  continue
+	  echo "No such font or not readable by grub: ${GRUB_FONT}" >&2
+	  exit 1
 	fi
-	if [ "${basename}" = "ascii" ] ; then
-	  # make sure all our children behave in conformance with ascii..
-	  export LANG=C
-	fi
-	break 2
+    else
+      for dir in ${pkgdatadir} /boot/grub /usr/share/grub ; do
+        for basename in unicode unifont ascii; do
+	  path="${dir}/${basename}.pf2"
+          if is_path_readable_by_grub ${path} > /dev/null ; then
+	    GRUB_FONT_PATH=${path}
+	  else
+	    continue
+	  fi
+	  if [ "${basename}" = "ascii" ] ; then
+	    # make sure all our children behave in conformance with ascii..
+	    export LANG=C
+	  fi
+	  break 2
+        done
       done
-    done
+    fi
     if [ -z "${GRUB_FONT_PATH}" ] ; then
       # fallback to the native terminal for this platform
       unset GRUB_TERMINAL_OUTPUT