From b63e90ab4e34b35ba0ce009992b0fc019eca3761 Mon Sep 17 00:00:00 2001 From: Brian Harring Date: Mon, 11 Dec 2023 17:10:20 -0800 Subject: [PATCH] fix(systemd-255): handle systemd-pcr{phase -> extend} rename The binary systemd-pcrphase was renamed to systemd-pcrextend in systemd 255, but the backing units were all left named systemd-pcrphase. Fixes: #2583 Signed-off-by: Brian Harring --- modules.d/01systemd-pcrphase/module-setup.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules.d/01systemd-pcrphase/module-setup.sh b/modules.d/01systemd-pcrphase/module-setup.sh index fa960a42c1..1294f1e0fc 100755 --- a/modules.d/01systemd-pcrphase/module-setup.sh +++ b/modules.d/01systemd-pcrphase/module-setup.sh @@ -6,7 +6,11 @@ check() { # If the binary(s) requirements are not fulfilled the module can't be installed. - require_binaries "$systemdutildir"/systemd-pcrphase || return 1 + # systemd-255 renamed the binary, check for old and new location. + if ! require_binaries "$systemdutildir"/systemd-pcrphase \ + && ! require_binaries "$systemdutildir"/systemd-pcrextend; then + return 1 + fi # Return 255 to only include the module, if another module requires it. return 255 @@ -28,6 +32,7 @@ install() { inst_multiple -o \ "$systemdutildir"/systemd-pcrphase \ + "$systemdutildir"/systemd-pcrextend \ "$systemdsystemunitdir"/systemd-pcrphase-initrd.service \ "$systemdsystemunitdir/systemd-pcrphase-initrd.service.d/*.conf" \ "$systemdsystemunitdir"/initrd.target.wants/systemd-pcrphase-initrd.service