nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

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