Enclose all translated strings in grub.cfg in single quotes, and
escape them appropriately (Ubuntu bug #552921). * util/grub-mkconfig_lib.in (gettext_quoted): New function. * util/grub.d/10_hurd.in: Use it. * util/grub.d/10_kfreebsd.in (kfreebsd_entry): Likewise. * util/grub.d/10_linux.in (linux_entry): Likewise. Also-By: Colin Watson <cjwatson@ubuntu.com>
This commit is contained in:
parent
4b0cd8f813
commit
ce44826e79
5 changed files with 27 additions and 12 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
||||||
|
2010-04-13 Carles Pina i Estany <carles@pina.cat>
|
||||||
|
2010-04-13 Colin Watson <cjwatson@ubuntu.com>
|
||||||
|
|
||||||
|
Enclose all translated strings in grub.cfg in single quotes, and
|
||||||
|
escape them appropriately (Ubuntu bug #552921).
|
||||||
|
|
||||||
|
* util/grub-mkconfig_lib.in (gettext_quoted): New function.
|
||||||
|
* util/grub.d/10_hurd.in: Use it.
|
||||||
|
* util/grub.d/10_kfreebsd.in (kfreebsd_entry): Likewise.
|
||||||
|
* util/grub.d/10_linux.in (linux_entry): Likewise.
|
||||||
|
|
||||||
2010-04-11 Vladimir Serbinenko <phcoder@gmail.com>
|
2010-04-11 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
Fix cygwin compilation.
|
Fix cygwin compilation.
|
||||||
|
|
|
@ -188,3 +188,7 @@ version_find_latest ()
|
||||||
done
|
done
|
||||||
echo "$a"
|
echo "$a"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gettext_quoted () {
|
||||||
|
gettext "$@" | sed "s/'/'\\\\''/g"
|
||||||
|
}
|
||||||
|
|
|
@ -76,13 +76,13 @@ menuentry "${OS}" ${CLASS} {
|
||||||
EOF
|
EOF
|
||||||
prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
|
prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
|
||||||
cat << EOF
|
cat << EOF
|
||||||
echo $(gettext "Loading GNU Mach ...")
|
echo '$(gettext_quoted "Loading GNU Mach ...")'
|
||||||
multiboot ${kernel} root=device:${GRUB_DEVICE#/dev/}
|
multiboot ${kernel} root=device:${GRUB_DEVICE#/dev/}
|
||||||
EOF
|
EOF
|
||||||
save_default_entry | sed -e "s/^/\t/"
|
save_default_entry | sed -e "s/^/\t/"
|
||||||
prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/\t/"
|
prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/\t/"
|
||||||
cat << EOF
|
cat << EOF
|
||||||
echo $(gettext "Loading the Hurd ...")
|
echo '$(gettext_quoted "Loading the Hurd ...")'
|
||||||
module /hurd/${hurd_fs}.static ${hurd_fs} --readonly \\
|
module /hurd/${hurd_fs}.static ${hurd_fs} --readonly \\
|
||||||
--multiboot-command-line='\${kernel-command-line}' \\
|
--multiboot-command-line='\${kernel-command-line}' \\
|
||||||
--host-priv-port='\${host-port}' \\
|
--host-priv-port='\${host-port}' \\
|
||||||
|
@ -98,13 +98,13 @@ menuentry "${OS} (recovery mode)" {
|
||||||
EOF
|
EOF
|
||||||
prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
|
prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/"
|
||||||
cat << EOF
|
cat << EOF
|
||||||
echo $(gettext "Loading GNU Mach ...")
|
echo '$(gettext_quoted "Loading GNU Mach ...")'
|
||||||
multiboot ${kernel} root=device:${GRUB_DEVICE#/dev/} -s
|
multiboot ${kernel} root=device:${GRUB_DEVICE#/dev/} -s
|
||||||
EOF
|
EOF
|
||||||
save_default_entry | sed -e "s/^/\t/"
|
save_default_entry | sed -e "s/^/\t/"
|
||||||
prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/\t/"
|
prepare_grub_to_access_device ${GRUB_DEVICE} | sed -e "s/^/\t/"
|
||||||
cat << EOF
|
cat << EOF
|
||||||
echo $(gettext "Loading the Hurd ...")
|
echo '$(gettext_quoted "Loading the Hurd ...")'
|
||||||
module /hurd/${hurd_fs}.static ${hurd_fs} \\
|
module /hurd/${hurd_fs}.static ${hurd_fs} \\
|
||||||
--multiboot-command-line='\${kernel-command-line}' \\
|
--multiboot-command-line='\${kernel-command-line}' \\
|
||||||
--host-priv-port='\${host-port}' \\
|
--host-priv-port='\${host-port}' \\
|
||||||
|
|
|
@ -44,15 +44,15 @@ kfreebsd_entry ()
|
||||||
version="$2"
|
version="$2"
|
||||||
recovery="$3" # not used yet
|
recovery="$3" # not used yet
|
||||||
args="$4" # not used yet
|
args="$4" # not used yet
|
||||||
title="$(gettext "%s, with kFreeBSD %s")"
|
title="$(gettext_quoted "%s, with kFreeBSD %s")"
|
||||||
printf "menuentry \"${title}\" ${CLASS} {\n" "${os}" "${version}"
|
printf "menuentry '${title}' ${CLASS} {\n" "${os}" "${version}"
|
||||||
save_default_entry | sed -e "s/^/\t/"
|
save_default_entry | sed -e "s/^/\t/"
|
||||||
if [ -z "${prepare_boot_cache}" ]; then
|
if [ -z "${prepare_boot_cache}" ]; then
|
||||||
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
|
prepare_boot_cache="$(prepare_grub_to_access_device ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
|
||||||
fi
|
fi
|
||||||
printf '%s\n' "${prepare_boot_cache}"
|
printf '%s\n' "${prepare_boot_cache}"
|
||||||
cat << EOF
|
cat << EOF
|
||||||
echo $(printf "$(gettext "Loading kernel of FreeBSD %s ...")" ${version})
|
echo '$(printf "$(gettext_quoted "Loading kernel of FreeBSD %s ...")" ${version})'
|
||||||
kfreebsd ${rel_dirname}/${basename}
|
kfreebsd ${rel_dirname}/${basename}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
|
@ -56,11 +56,11 @@ linux_entry ()
|
||||||
recovery="$3"
|
recovery="$3"
|
||||||
args="$4"
|
args="$4"
|
||||||
if ${recovery} ; then
|
if ${recovery} ; then
|
||||||
title="$(gettext "%s, with Linux %s (recovery mode)")"
|
title="$(gettext_quoted "%s, with Linux %s (recovery mode)")"
|
||||||
else
|
else
|
||||||
title="$(gettext "%s, with Linux %s")"
|
title="$(gettext_quoted "%s, with Linux %s")"
|
||||||
fi
|
fi
|
||||||
printf "menuentry \"${title}\" ${CLASS} {\n" "${os}" "${version}"
|
printf "menuentry '${title}' ${CLASS} {\n" "${os}" "${version}"
|
||||||
save_default_entry | sed -e "s/^/\t/"
|
save_default_entry | sed -e "s/^/\t/"
|
||||||
|
|
||||||
# Use ELILO's generic "efifb" when it's known to be available.
|
# Use ELILO's generic "efifb" when it's known to be available.
|
||||||
|
@ -83,12 +83,12 @@ EOF
|
||||||
fi
|
fi
|
||||||
printf '%s\n' "${prepare_boot_cache}"
|
printf '%s\n' "${prepare_boot_cache}"
|
||||||
cat << EOF
|
cat << EOF
|
||||||
echo $(printf "$(gettext "Loading Linux %s ...")" ${version})
|
echo '$(printf "$(gettext_quoted "Loading Linux %s ...")" ${version})'
|
||||||
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
|
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
|
||||||
EOF
|
EOF
|
||||||
if test -n "${initrd}" ; then
|
if test -n "${initrd}" ; then
|
||||||
cat << EOF
|
cat << EOF
|
||||||
echo $(gettext "Loading initial ramdisk ...")
|
echo '$(gettext_quoted "Loading initial ramdisk ...")'
|
||||||
initrd ${rel_dirname}/${initrd}
|
initrd ${rel_dirname}/${initrd}
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Reference in a new issue