dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone
28f7f8
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
606ea6
From: Prarit Bhargava <prarit@redhat.com>
606ea6
Date: Wed, 12 Mar 2014 10:58:16 -0400
28f7f8
Subject: [PATCH] Fix bad test on GRUB_DISABLE_SUBMENU.
606ea6
606ea6
The file /etc/grub.d/10_linux does
606ea6
606ea6
if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then
606ea6
606ea6
when it should do
606ea6
606ea6
if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xtrue ]; then
606ea6
606ea6
which results in submenus in /boot/grub2/grub.cfg when
606ea6
GRUB_DISABLE_SUBMENU="yes".
606ea6
606ea6
Resolves: rhbz#1063414
606ea6
---
606ea6
 util/grub.d/10_linux.in | 6 +++++-
606ea6
 1 file changed, 5 insertions(+), 1 deletion(-)
606ea6
606ea6
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
28f7f8
index 136abd7a6e3..767093c636a 100644
606ea6
--- a/util/grub.d/10_linux.in
606ea6
+++ b/util/grub.d/10_linux.in
606ea6
@@ -255,7 +255,11 @@ while [ "x$list" != "x" ] ; do
606ea6
     linux_root_device_thisversion=${GRUB_DEVICE}
606ea6
   fi
606ea6
 
606ea6
-  if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then
606ea6
+  if [ "x${GRUB_DISABLE_SUBMENU}" = "xyes" ] || [ "x${GRUB_DISABLE_SUBMENU}" = "xy" ]; then
606ea6
+    GRUB_DISABLE_SUBMENU="true"
606ea6
+  fi
606ea6
+
606ea6
+  if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xtrue ]; then
606ea6
     linux_entry "${OS}" "${version}" simple \
606ea6
     "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"
606ea6