]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
fix(1001): use efivars fs over the deprecated sysfs entries
authorDaniel Molkentin <dmolkentin@suse.com>
Tue, 19 Jan 2021 17:46:13 +0000 (18:46 +0100)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Mon, 25 Jan 2021 14:58:11 +0000 (14:58 +0000)
sysfs efi vars has been dropped for non-x86 systems since kernel 5.10.

modules.d/95fcoe-uefi/parse-uefifcoe.sh
modules.d/99uefi-lib/uefi-lib.sh

index 87d49660185735773592bc2f05a6f8c2cf11c634..684f53a2063ccb760ca3b58bd6863aaee8ed1d46 100755 (executable)
@@ -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
index 6eac0ccfd07bdc74279875b87682857f0fba0425..3245db8d431f61a9c7e390a99bda6185318db82c 100755 (executable)
@@ -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
     {