merge with Trunk

This commit is contained in:
Carles Pina i Estany 2009-11-21 21:05:15 +00:00
commit a239a5e9cc
8 changed files with 198 additions and 58 deletions

View file

@ -22,7 +22,8 @@ prefix=@prefix@
exec_prefix=@exec_prefix@
libdir=@libdir@
grub_prefix=`echo /boot/grub | sed ${transform}`
locale_prefix="/usr/share/locale" # TODO: dynamic with exec_prefix ?
locale_dir=`echo /boot/grub/locale | sed ${transform}`
grub_lang=`echo $LANG | cut -d _ -f 1`
. ${libdir}/grub/grub-mkconfig_lib
@ -101,20 +102,12 @@ EOF
;;
esac
if test -e ${grub_prefix}/gettext.mod -a -d /usr/share/locale; then
# Make the locales accesible
prepare_grub_to_access_device `${grub_probe} --target=device ${locale_prefix}`
lang=`get_locale_lang`
grub_locale_prefix=`make_system_path_relative_to_its_root ${locale_prefix}`
cat << EOF
# Gettext variables and module
set locale_prefix=${grub_locale_prefix}
set lang=${lang}
cat << EOF
set locale_dir=${locale_dir}
set lang=${grub_lang}
insmod gettext
EOF
else
echo "gettext module or /usr/share/locale is not available"
fi
if [ "x${GRUB_HIDDEN_TIMEOUT}" != "x" ] ; then
if [ "x${GRUB_HIDDEN_TIMEOUT_QUIET}" = "xtrue" ] ; then

View file

@ -88,11 +88,16 @@ EOF
LLABEL="${LONGNAME}"
fi
if [ "${LROOT}" != "${LBOOT}" ]; then
LKERNEL="${LKERNEL#/boot}"
LINITRD="${LINITRD#/boot}"
fi
cat << EOF
menuentry "${LLABEL} (on ${DEVICE})" {
EOF
if [ -z "${prepare_boot_cache}" ]; then
prepare_boot_cache="$(prepare_grub_to_access_device ${DEVICE} | sed -e "s/^/\t/")"
prepare_boot_cache="$(prepare_grub_to_access_device ${LBOOT} | sed -e "s/^/\t/")"
fi
printf '%s\n' "${prepare_boot_cache}"
cat << EOF