From f824f526755a54969a90785d3b66d20778a9a9d3 Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Tue, 19 Jan 2021 18:46:13 +0100 Subject: [PATCH] fix(1001): use efivars fs over the deprecated sysfs entries sysfs efi vars has been dropped for non-x86 systems since kernel 5.10. --- modules.d/95fcoe-uefi/parse-uefifcoe.sh | 2 +- modules.d/99uefi-lib/uefi-lib.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules.d/95fcoe-uefi/parse-uefifcoe.sh b/modules.d/95fcoe-uefi/parse-uefifcoe.sh index 87d496601..684f53a20 100755 --- a/modules.d/95fcoe-uefi/parse-uefifcoe.sh +++ b/modules.d/95fcoe-uefi/parse-uefifcoe.sh @@ -28,7 +28,7 @@ print_fcoe_uefi_conf() return 0 } -for i in /sys/firmware/efi/vars/FcoeBootDevice-*/data; do +for i in /sys/firmware/efi/efivars/FcoeBootDevice-*; do [ -e "$i" ] || continue print_fcoe_uefi_conf $i > /etc/cmdline.d/40-fcoe-uefi.conf && break done diff --git a/modules.d/99uefi-lib/uefi-lib.sh b/modules.d/99uefi-lib/uefi-lib.sh index 6eac0ccfd..3245db8d4 100755 --- a/modules.d/99uefi-lib/uefi-lib.sh +++ b/modules.d/99uefi-lib/uefi-lib.sh @@ -40,7 +40,7 @@ getword () { # Acpi(PNP0A08,0x0)/Pci(0x3,0x0)/Pci(0x0,0x0)/MAC(90E2BA265ED4,0x0)/Vlan(172)/Fibre(0x4EA06104A0CC0050,0x0) uefi_device_path() { - data=${1:-/sys/firmware/efi/vars/FcoeBootDevice-a0ebca23-5f9c-447a-a268-22b6c158c2ac/data} + data=${1:-/sys/firmware/efi/efivars/FcoeBootDevice-a0ebca23-5f9c-447a-a268-22b6c158c2ac} [ -f "$data" ] || return 1 local IFS= LC_CTYPE=C res tt len type hextype first @@ -106,7 +106,7 @@ uefi_device_path() get_fcoe_boot_mac() { - data=${1:-/sys/firmware/efi/vars/FcoeBootDevice-a0ebca23-5f9c-447a-a268-22b6c158c2ac/data} + data=${1:-/sys/firmware/efi/efivars/FcoeBootDevice-a0ebca23-5f9c-447a-a268-22b6c158c2ac} [ -f "$data" ] || return 1 local IFS= LC_CTYPE=C tt len type hextype { @@ -138,7 +138,7 @@ get_fcoe_boot_mac() get_fcoe_boot_vlan() { - data=${1:-/sys/firmware/efi/vars/FcoeBootDevice-a0ebca23-5f9c-447a-a268-22b6c158c2ac/data} + data=${1:-/sys/firmware/efi/efivars/FcoeBootDevice-a0ebca23-5f9c-447a-a268-22b6c158c2ac} [ -f "$data" ] || return 1 local IFS= LC_CTYPE=C tt len type hextype { -- 2.47.3