summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve McIntyre <93sam@debian.org>2021-01-05 00:00:02 +0000
committerColin Watson <cjwatson@debian.org>2021-02-06 17:29:37 +0000
commitc65654e97ea4037c257267f3470d8ad296edd69b (patch)
tree8f49cc7f4d8ac641d5ac1708620cc6ca7823e2cb
parentecb767ebd71a5544ba82b2c4cc86855bab5655eb (diff)
Switch to using the efivarfs interface for detecting "system setup"
The old efivarfs interface is deprecated and has been disabled in newer Debian kernels. Patch-Name: uefi-firmware-efivarfs.patch
-rw-r--r--util/grub.d/30_uefi-firmware.in6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/grub.d/30_uefi-firmware.in b/util/grub.d/30_uefi-firmware.in
index 3c9f533d8..93ececffe 100644
--- a/util/grub.d/30_uefi-firmware.in
+++ b/util/grub.d/30_uefi-firmware.in
@@ -26,12 +26,12 @@ export TEXTDOMAINDIR="@localedir@"
. "@datadir@/@PACKAGE@/grub-mkconfig_lib"
-efi_vars_dir=/sys/firmware/efi/vars
+efi_vars_dir=/sys/firmware/efi/efivars
EFI_GLOBAL_VARIABLE=8be4df61-93ca-11d2-aa0d-00e098032b8c
-OsIndications="$efi_vars_dir/OsIndicationsSupported-$EFI_GLOBAL_VARIABLE/data"
+OsIndications="$efi_vars_dir/OsIndicationsSupported-$EFI_GLOBAL_VARIABLE"
if [ -e "$OsIndications" ] && \
- [ "$(( $(printf 0x%x \'"$(cat $OsIndications | cut -b1)") & 1 ))" = 1 ]; then
+ [ "$(( $(printf 0x%x \'"$(cat $OsIndications | cut -b5)") & 1 ))" = 1 ]; then
LABEL="System setup"
gettext_printf "Adding boot menu entry for EFI firmware configuration\n" >&2