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