dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

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

23d2ea
From 4d363cc16d83a499ea1b14212e77e9e9c79d4984 Mon Sep 17 00:00:00 2001
606ea6
From: Prarit Bhargava <prarit@redhat.com>
606ea6
Date: Wed, 12 Mar 2014 10:58:16 -0400
27a4da
Subject: [PATCH 135/260] 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
27a4da
index 136abd7a6..767093c63 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
 
606ea6
-- 
27a4da
2.13.0
606ea6