dcavalca / rpms / grub2

Forked from rpms/grub2 3 years ago
Clone

Blame SOURCES/0211-Export-grub-get-kernel-settings-variables.patch

28f7f8
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
23d2ea
From: Peter Jones <pjones@redhat.com>
23d2ea
Date: Thu, 25 Aug 2016 14:15:29 -0400
28f7f8
Subject: [PATCH] Export grub-get-kernel-settings variables
23d2ea
23d2ea
Without this export, the generators for various configs never get the
23d2ea
setting.
23d2ea
23d2ea
Related: rhbz#1226325
23d2ea
23d2ea
Signed-off-by: Peter Jones <example@example.com>
23d2ea
---
23d2ea
 util/grub-get-kernel-settings.in | 3 +++
23d2ea
 util/grub.d/10_linux.in          | 6 +++---
23d2ea
 2 files changed, 6 insertions(+), 3 deletions(-)
23d2ea
23d2ea
diff --git a/util/grub-get-kernel-settings.in b/util/grub-get-kernel-settings.in
28f7f8
index 6a68a0ef664..12046219878 100644
23d2ea
--- a/util/grub-get-kernel-settings.in
23d2ea
+++ b/util/grub-get-kernel-settings.in
23d2ea
@@ -70,6 +70,9 @@ fi
23d2ea
 
23d2ea
 if [ "$MAKEDEBUG" = "yes" ]; then
23d2ea
     echo GRUB_LINUX_MAKE_DEBUG=true
23d2ea
+    echo export GRUB_LINUX_MAKE_DEBUG
23d2ea
     echo GRUB_CMDLINE_LINUX_DEBUG=\"systemd.log_level=debug systemd.log_target=kmsg\"
23d2ea
+    echo export GRUB_CMDLINE_LINUX_DEBUG
23d2ea
     echo GRUB_LINUX_DEBUG_TITLE_POSTFIX=\" with debugging\"
23d2ea
+    echo export GRUB_LINUX_DEBUG_TITLE_POSTFIX
23d2ea
 fi
23d2ea
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
28f7f8
index 0d0086d3b6a..bf0fb727bcd 100644
23d2ea
--- a/util/grub.d/10_linux.in
23d2ea
+++ b/util/grub.d/10_linux.in
23d2ea
@@ -127,13 +127,13 @@ linux_entry ()
23d2ea
 	  quoted="$(echo "$GRUB_ACTUAL_DEFAULT" | grub_quote)"
23d2ea
 	  title_correction_code="${title_correction_code}if [ \"x\$default\" = '$quoted' ]; then default='$(echo "$replacement_title" | grub_quote)'; fi;"
23d2ea
       fi
23d2ea
+      if [ x$isdebug = xdebug ]; then
23d2ea
+	  title="$title${GRUB_LINUX_DEBUG_TITLE_POSTFIX}"
23d2ea
+      fi
23d2ea
       echo "menuentry '$(echo "$title" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-$version-$type-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
23d2ea
   else
23d2ea
       echo "menuentry '$(echo "$os" | grub_quote)' ${CLASS} \$menuentry_id_option 'gnulinux-simple-$boot_device_id' {" | sed "s/^/$submenu_indentation/"
23d2ea
   fi      
23d2ea
-  if [ x$isdebug = xdebug ]; then
23d2ea
-      title="$title${GRUB_LINUX_DEBUG_TITLE_POSTFIX}"
23d2ea
-  fi
23d2ea
   if [ x$type != xrecovery ] ; then
23d2ea
       save_default_entry | grub_add_tab
23d2ea
   fi