[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

install script for fwupdate



Hello all,

I am currently trying to get rid of the deprecated efivars sysfs code
in Linux, as it has been superseded by efivarfs a long time ago.

Today, I spotted one of the remaining dependencies, and I guess there
might be more: in the fwupdate .deb install script is a check based on
the sysfs code, which can fortunately be trivially modified to switch
to efivarfs, e.g.,

--- /usr/lib/fwupdate/install 2020-07-23 14:06:41.000000000 +0200
+++ /home/ard/install 2020-10-17 23:50:57.463577110 +0200
@@ -2,13 +2,13 @@

 DISTRIBUTOR=debian

-efi_vars_dir=/sys/firmware/efi/vars
+efi_vars_dir=/sys/firmware/efi/efivars
 EFI_GLOBAL_VARIABLE=8be4df61-93ca-11d2-aa0d-00e098032b8c
-SB="$efi_vars_dir/SecureBoot-$EFI_GLOBAL_VARIABLE/data"
+SB="$efi_vars_dir/SecureBoot-$EFI_GLOBAL_VARIABLE"

 #if we have SB enabled, don't bother to install the unsigned file
 if [ -e "$SB" ] && \
-   [ "$(( $(printf 0x%x \'"$(cat "$SB" | cut -b1)") & 1 ))" = 1 ]; then
+   [ "$(( $(printf 0x%x \'"$(cat "$SB" | cut -b5)") & 1 ))" = 1 ]; then
    SECURE_BOOT="1"
 fi

Should I file a bug for this? Is anyone aware of other places to look
for issues like this?


Reply to: