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

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