integ/grub/grub2/centos/patches/1001-add-tboot.patch
jmckenna b546e2213b Uprev grub2 package to 0.64
Uprev grub2 package to 0.64.  This required regeneration and
restructuring of the patch and meta-patch files

Depends-On: https://review.openstack.org/#/c/578440

Change-Id: I462cefad6dd929601f6368364ef83327f69be161
Signed-off-by: Scott Little <scott.little@windriver.com>
2018-08-01 15:39:52 -04:00

43 lines
1.1 KiB
Diff

From 4a1a40ca64be1a2350ec90ceb9089dc0a3950231 Mon Sep 17 00:00:00 2001
From: Bin Qian <bin.qian@windriver.com>
Date: Tue, 21 Nov 2017 15:36:42 -0500
Subject: [PATCH 1/1] add tboot
---
util/grub-mkconfig.in | 2 +-
util/grub.d/10_linux.in | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/util/grub-mkconfig.in b/util/grub-mkconfig.in
index 86801aa..b149cec 100644
--- a/util/grub-mkconfig.in
+++ b/util/grub-mkconfig.in
@@ -125,7 +125,7 @@ set $grub_probe dummy
if test -f "$1"; then
:
else
- gettext_print "%s: Not found.\n" "$1" 1>&2
+ gettext_printf "%s: Not found.\n" "$1" 1>&2
exit 1
fi
diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
index 3b29c23..61406e4 100644
--- a/util/grub.d/10_linux.in
+++ b/util/grub.d/10_linux.in
@@ -23,6 +23,11 @@ datarootdir="@datarootdir@"
. "@datadir@/@PACKAGE@/grub-mkconfig_lib"
+tboot=`cat /proc/cmdline | xargs -n1 | grep '^tboot=true$'` || true
+if [ -n "$tboot" ]; then
+ exit 0
+fi
+
export TEXTDOMAIN=@PACKAGE@
export TEXTDOMAINDIR="@localedir@"
--
1.8.3.1