Blame SOURCES/0135-Fix-bad-test-on-GRUB_DISABLE_SUBMENU.patch

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