--- /etc/grub.d/10_linux.bkp 2013-02-19 19:33:20.674283559 +0100 +++ /etc/grub.d/10_linux 2013-02-19 19:25:03.473633983 +0100 @@ -240,9 +240,10 @@ linux_root_device_thisversion=${GRUB_DEVICE} fi - if [ "x$is_first_entry" = xtrue ]; then - linux_entry "${OS}" "${version}" simple \ - "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" + if [ "x${GRUB_DISABLE_SUBMENU}" = xfalse ]; then + if [ "x$is_first_entry" = xtrue ]; then + linux_entry "${OS}" "${version}" simple \ + "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" submenu_indentation="\t" @@ -251,6 +252,7 @@ fi # TRANSLATORS: %s is replaced with an OS name echo "submenu '$(gettext_printf "Advanced options for %s" "${OS}" | grub_quote)' \$menuentry_id_option 'gnulinux-advanced-$boot_device_id' {" + fi fi linux_entry "${OS}" "${version}" advanced \ @@ -266,8 +268,9 @@ # If at least one kernel was found, then we need to # add a closing '}' for the submenu command. -if [ x"$is_first_entry" != xtrue ]; then - echo '}' +if [ "x${GRUB_DISABLE_SUBMENU}" = xfalse ]; then + if [ x"$is_first_entry" != xtrue ]; then + echo '}' + fi fi - echo "$title_correction_code"