Blame SOURCES/0196-30_uefi-firmware-fix-use-with-sys-firmware-efi-efiva.patch

d9d99f
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
d9d99f
From: Hans de Goede <hdegoede@redhat.com>
d9d99f
Date: Fri, 29 Jun 2018 10:08:22 +0200
d9d99f
Subject: [PATCH] 30_uefi-firmware: fix use with /sys/firmware/efi/efivars
d9d99f
d9d99f
Fix 30_uefi-firmware checking for the obsolete /sys/firmware/efi/vars
d9d99f
instead of for the new efivarfs mounted at /sys/firmware/efi/efivars.
d9d99f
d9d99f
Which goes to show that I really should have tested this before blindly
d9d99f
importing it from Ubuntu.
d9d99f
d9d99f
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
d9d99f
---
d9d99f
 util/grub.d/30_uefi-firmware.in | 6 +++---
d9d99f
 1 file changed, 3 insertions(+), 3 deletions(-)
d9d99f
d9d99f
diff --git a/util/grub.d/30_uefi-firmware.in b/util/grub.d/30_uefi-firmware.in
d9d99f
index 3c9f533d8c6..93ececffea7 100644
d9d99f
--- a/util/grub.d/30_uefi-firmware.in
d9d99f
+++ b/util/grub.d/30_uefi-firmware.in
d9d99f
@@ -26,12 +26,12 @@ export TEXTDOMAINDIR="@localedir@"
d9d99f
 
d9d99f
 . "@datadir@/@PACKAGE@/grub-mkconfig_lib"
d9d99f
 
d9d99f
-efi_vars_dir=/sys/firmware/efi/vars
d9d99f
+efi_vars_dir=/sys/firmware/efi/efivars
d9d99f
 EFI_GLOBAL_VARIABLE=8be4df61-93ca-11d2-aa0d-00e098032b8c
d9d99f
-OsIndications="$efi_vars_dir/OsIndicationsSupported-$EFI_GLOBAL_VARIABLE/data"
d9d99f
+OsIndications="$efi_vars_dir/OsIndicationsSupported-$EFI_GLOBAL_VARIABLE"
d9d99f
 
d9d99f
 if [ -e "$OsIndications" ] && \
d9d99f
-   [ "$(( $(printf 0x%x \'"$(cat $OsIndications | cut -b1)") & 1 ))" = 1 ]; then
d9d99f
+   [ "$(( $(printf 0x%x \'"$(cat $OsIndications | cut -b5)") & 1 ))" = 1 ]; then
d9d99f
   LABEL="System setup"
d9d99f
 
d9d99f
   gettext_printf "Adding boot menu entry for EFI firmware configuration\n" >&2