2009-08-07 Felix Zielcke <fzielcke@z-51.de>
* util/grub-mkconfig_lib.in (font_path): Move the functionality of it to ... * util/grub-mkconfig.in: ... here. Prefer unicode.pf2 and unifont.pf2 over ascii.pf2. Export LANG=C in case ascii.pf2 gets used.
This commit is contained in:
parent
9d5bdd2cf6
commit
b969c52f6b
3 changed files with 28 additions and 28 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2009-08-07 Felix Zielcke <fzielcke@z-51.de>
|
||||||
|
|
||||||
|
* util/grub-mkconfig_lib.in (font_path): Move the functionality
|
||||||
|
of it to ...
|
||||||
|
* util/grub-mkconfig.in: ... here. Prefer unicode.pf2 and
|
||||||
|
unifont.pf2 over ascii.pf2. Export LANG=C in case ascii.pf2 gets used.
|
||||||
|
|
||||||
2009-08-07 Robert Millan <rmh.grub@aybabtu.com>
|
2009-08-07 Robert Millan <rmh.grub@aybabtu.com>
|
||||||
|
|
||||||
* util/grub.d/10_linux.in (test_numeric): Moved from here ...
|
* util/grub.d/10_linux.in (test_numeric): Moved from here ...
|
||||||
|
|
|
@ -24,6 +24,8 @@ sbindir=@sbindir@
|
||||||
libdir=@libdir@
|
libdir=@libdir@
|
||||||
sysconfdir=@sysconfdir@
|
sysconfdir=@sysconfdir@
|
||||||
package_version=@PACKAGE_VERSION@
|
package_version=@PACKAGE_VERSION@
|
||||||
|
datadir=@datadir@
|
||||||
|
pkgdatadir=${datadir}/`echo @PACKAGE_TARNAME@ | sed "${transform}"`
|
||||||
grub_prefix=`echo /boot/grub | sed ${transform}`
|
grub_prefix=`echo /boot/grub | sed ${transform}`
|
||||||
grub_cfg=""
|
grub_cfg=""
|
||||||
grub_mkconfig_dir=${sysconfdir}/grub.d
|
grub_mkconfig_dir=${sysconfdir}/grub.d
|
||||||
|
@ -151,22 +153,30 @@ esac
|
||||||
# check for terminals that require fonts
|
# check for terminals that require fonts
|
||||||
case ${GRUB_TERMINAL_OUTPUT} in
|
case ${GRUB_TERMINAL_OUTPUT} in
|
||||||
gfxterm)
|
gfxterm)
|
||||||
if path=`font_path` ; then
|
for dir in ${pkgdatadir} /boot/grub /usr/share/grub ; do
|
||||||
GRUB_FONT_PATH="${path}"
|
for basename in unicode unifont ascii; do
|
||||||
else
|
path="${dir}/${basename}.pf2"
|
||||||
# fallback to the native terminal for this platform
|
if is_path_readable_by_grub ${path} > /dev/null ; then
|
||||||
unset GRUB_TERMINAL_OUTPUT
|
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
|
||||||
|
if [ -z "${GRUB_FONT_PATH}" ] ; then
|
||||||
|
# fallback to the native terminal for this platform
|
||||||
|
unset GRUB_TERMINAL_OUTPUT
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
|
||||||
|
|
||||||
# does our terminal support utf-8 ?
|
|
||||||
case ${GRUB_TERMINAL_OUTPUT} in
|
|
||||||
gfxterm) ;;
|
|
||||||
*)
|
*)
|
||||||
# make sure all our children behave in conformance with ascii..
|
# make sure all our children behave in conformance with ascii..
|
||||||
export LANG=C
|
export LANG=C
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# These are defined in this script, export them here so that user can
|
# These are defined in this script, export them here so that user can
|
||||||
|
|
|
@ -148,23 +148,6 @@ prepare_grub_to_access_device ()
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
font_path ()
|
|
||||||
{
|
|
||||||
for dir in ${pkgdatadir} /boot/grub /usr/share/grub ; do
|
|
||||||
# FIXME: We prefer ascii because loading complete fonts is too slow (and
|
|
||||||
# we don't yet provide the gettext magic that would make unicode useful).
|
|
||||||
for basename in ascii unicode unifont ; do
|
|
||||||
path="${dir}/${basename}.pf2"
|
|
||||||
if is_path_readable_by_grub ${path} > /dev/null ; then
|
|
||||||
echo "${path}"
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
|
||||||
|
|
||||||
return 1
|
|
||||||
}
|
|
||||||
|
|
||||||
grub_file_is_not_garbage ()
|
grub_file_is_not_garbage ()
|
||||||
{
|
{
|
||||||
if test -f "$1" ; then
|
if test -f "$1" ; then
|
||||||
|
|
Loading…
Add table
Reference in a new issue