dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

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

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