Bug#1018720: fwupd: quesion / suggestion regarding fwupd.postinst at line 33
Package: fwupd
Version: 1.8.3-1
Severity: wishlist
Dear Maintainer,
The line 33 is:
EFIDIR=$(awk '/^ID=/ {gsub(/"/,""); split($$0,a,"="); print tolower(a[2])}'
/etc/os-release)
1. I do not understand the need of '$$0' and not simply '$0'?
2. And why not doing something like the following?
EFIDIR=$(sh -c '. /etc/os-release ; echo $ID')
(no awk dep then)
Thanks,
Patrice
-- System Information:
Debian Release: bookworm/sid
APT prefers unstable-debug
APT policy: (500, 'unstable-debug'), (500, 'unstable'), (1, 'experimental-debug'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 5.18.0-4-amd64 (SMP w/12 CPU threads; PREEMPT)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages fwupd depends on:
ii libarchive13 3.6.0-1
ii libc6 2.34-7
ii libcurl3-gnutls 7.84.0-2
ii libefiboot1 37-6
ii libflashrom1 1.2-5
ii libfwupd2 1.8.3-1
ii libfwupdplugin7 1.8.3-1
ii libglib2.0-0 2.73.3-2
ii libgnutls30 3.7.7-2
ii libgudev-1.0-0 237-2
ii libgusb2 0.3.10-1
ii libjcat1 0.1.9-1
ii libjson-glib-1.0-0 1.6.6-1
ii libmbim-glib4 1.26.4-1
ii libmbim-proxy 1.26.4-1
ii libmm-glib0 1.18.10-1
ii libpolkit-gobject-1-0 0.105-33
ii libprotobuf-c1 1.4.1-1
ii libqmi-glib5 1.30.8-1
ii libqmi-proxy 1.30.8-1
ii libsmbios-c2 2.4.3-1
ii libsqlite3-0 3.39.2-1
ii libsystemd0 251.4-3
ii libtss2-esys-3.0.2-0 3.2.0-1+b1
ii libxmlb2 0.3.8-1
ii shared-mime-info 2.2-1
Versions of packages fwupd recommends:
ii bolt 0.9.3-1
ii dbus 1.14.0-2
ii fwupd-amd64-signed [fwupd-signed] 1:1.2+3
ii python3 3.10.6-1
pn secureboot-db <none>
ii udisks2 2.9.4-2
Versions of packages fwupd suggests:
pn gir1.2-fwupd-2.0 <none>
-- no debconf information
Reply to: