Skip to content

Commit

Permalink
Backport fix to GRUB_DISABLE_SUBMENU value parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
marmarek committed Feb 26, 2020
1 parent aa54b9e commit 0611f18
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
38 changes: 38 additions & 0 deletions 0021-Fix-bad-test-on-GRUB_DISABLE_SUBMENU.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Prarit Bhargava <[email protected]>
Date: Wed, 12 Mar 2014 10:58:16 -0400
Subject: [PATCH] Fix bad test on GRUB_DISABLE_SUBMENU.

The file /etc/grub.d/10_linux does

if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then

when it should do

if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xtrue ]; then

which results in submenus in /boot/grub2/grub.cfg when
GRUB_DISABLE_SUBMENU="yes".

Resolves: rhbz#1063414
---
util/grub.d/10_linux.in | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 61ebd7dc714..87a7da34982 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -261,7 +261,11 @@ while [ "x$list" != "x" ] ; do
fi
fi

- if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xy ]; then
+ if [ "x${GRUB_DISABLE_SUBMENU}" = "xyes" ] || [ "x${GRUB_DISABLE_SUBMENU}" = "xy" ]; then
+ GRUB_DISABLE_SUBMENU="true"
+ fi
+
+ if [ "x$is_top_level" = xtrue ] && [ "x${GRUB_DISABLE_SUBMENU}" != xtrue ]; then
linux_entry "${OS}" "${version}" simple \
"${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}"

1 change: 1 addition & 0 deletions grub2.spec
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,7 @@ Source13: 99-grub-mkconfig.install
Patch0000: 0000-compiler-unused.patch
Patch0007: 0007-re-write-.gitignore.patch
Patch0012: 0012-Move-bash-completion-script-922997.patch
Patch0021: 0021-Fix-bad-test-on-GRUB_DISABLE_SUBMENU.patch
Patch0041: 0041-Don-t-say-GNU-Linux-in-generated-menus.patch
Patch0044: 0044-Add-.eh_frame-to-list-of-relocations-stripped.patch
Patch0048: 0048-Replace-a-lot-of-man-pages-with-slightly-nicer-ones.patch
Expand Down

0 comments on commit 0611f18

Please sign in to comment.