Use submenus in grub-mkconfig.

* util/grub-mkconfig.in: Define GRUB_ACTUAL_DEFAULT.
	* util/grub-mkconfig_lib.in (grub_quote): New function.
	(gettext_printf): Use gettext and not gettext_quoted to fix several
	messages.
	* util/grub.d/10_hurd.in: Use submenus.
	* util/grub.d/10_kfreebsd.in: Likewise.
	* util/grub.d/10_linux.in: Likewise.
	* util/grub.d/10_netbsd.in: Likewise.
	* util/grub.d/20_linux_xen.in: Likewise.
	* util/grub.d/30_os-prober.in: Likewise.
	* util/grub.d/10_illumos.in: Add missing quoting.
	* util/grub.d/10_windows.in: Likewise.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2012-03-04 22:18:33 +01:00
parent d9bef9bc43
commit 0cdc126ca2
11 changed files with 424 additions and 154 deletions

View file

@ -67,11 +67,11 @@ for drv in $drives ; do
# Check for Vista bootmgr.
if [ -f "$dir"/bootmgr -a -f "$dir"/boot/bcd ] ; then
OS="$(gettext_quoted "Windows Vista/7 (loader)")"
OS="$(gettext "Windows Vista/7 (loader)")"
osid=bootmgr
# Check for NTLDR.
elif [ -f "$dir"/ntldr -a -f "$dir"/ntdetect.com -a -f "$dir"/boot.ini ] ; then
OS=`get_os_name_from_boot_ini "$dir"/boot.ini` || OS="$(gettext_quoted "Windows NT/2000/XP (loader)")"
OS=`get_os_name_from_boot_ini "$dir"/boot.ini` || OS="$(gettext "Windows NT/2000/XP (loader)")"
osid=ntldr
needmap=t
@ -84,7 +84,7 @@ for drv in $drives ; do
gettext_printf "Found %s on %s (%s)\n" "$OS" "$drv" "$dev" >&2
cat << EOF
menuentry "$OS" \$menuentry_id_option '$osid-$(grub_get_device_id "${dev}")' {
menuentry '$(echo "$OS" | grub_quote)' \$menuentry_id_option '$osid-$(grub_get_device_id "${dev}")' {
EOF
save_default_entry | sed -e 's,^,\t,'