Skip to content
This repository has been archived by the owner on May 18, 2024. It is now read-only.

Commit

Permalink
fix(systemd-255): handle systemd-pcr{phase -> extend} rename
Browse files Browse the repository at this point in the history
The binary systemd-pcrphase was renamed to systemd-pcrextend
in systemd 255, but the backing units were all left named
systemd-pcrphase.

Fixes: dracutdevs#2583

Signed-off-by: Brian Harring <[email protected]>
  • Loading branch information
ferringb authored and Conan-Kudo committed Mar 31, 2024
1 parent 9ac195c commit b63e90a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules.d/01systemd-pcrphase/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit b63e90a

Please sign in to comment.