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

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