]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
units: change assert to condition to skip running in initrd/os
authorLuca Boccassi <bluca@debian.org>
Wed, 8 Feb 2023 23:06:27 +0000 (23:06 +0000)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 9 Feb 2023 12:04:21 +0000 (12:04 +0000)
These units are also present in the initrd, so instead of an assert,
just use a condition so they are skipped where they need to be skipped.

Fixes https://github.com/systemd/systemd/issues/26358

units/systemd-pcrfs-root.service.in
units/systemd-pcrfs@.service.in
units/systemd-pcrmachine.service.in
units/systemd-pcrphase-initrd.service.in
units/systemd-pcrphase-sysinit.service.in
units/systemd-pcrphase.service.in

index b0da413bb438ec5ea96c4edb23a271131c4163ed..432eb9fd8ce82815cd26697b5128a2b0c4455f3e 100644 (file)
@@ -14,7 +14,7 @@ DefaultDependencies=no
 Conflicts=shutdown.target
 After=systemd-pcrmachine.service
 Before=shutdown.target
-AssertPathExists=!/etc/initrd-release
+ConditionPathExists=!/etc/initrd-release
 ConditionSecurity=tpm2
 ConditionPathExists=/sys/firmware/efi/efivars/StubPcrKernelImage-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f
 
index ec1ff118c3d847c31864f79af174c8eb7ae099f7..6bbd4b72a53bc5547a72ea4418dc5afe31fe4559 100644 (file)
@@ -15,7 +15,7 @@ BindsTo=%i.mount
 Conflicts=shutdown.target
 After=%i.mount systemd-pcrfs-root.service
 Before=shutdown.target
-AssertPathExists=!/etc/initrd-release
+ConditionPathExists=!/etc/initrd-release
 ConditionSecurity=tpm2
 ConditionPathExists=/sys/firmware/efi/efivars/StubPcrKernelImage-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f
 
index e154a7eec1122481aa75947ad9cc15c23cdc9e07..f1c6ce9f265d40285a68bea9494cf35c6acf6f98 100644 (file)
@@ -13,7 +13,7 @@ Documentation=man:systemd-pcrmachine.service(8)
 DefaultDependencies=no
 Conflicts=shutdown.target
 Before=sysinit.target shutdown.target
-AssertPathExists=!/etc/initrd-release
+ConditionPathExists=!/etc/initrd-release
 ConditionSecurity=tpm2
 ConditionPathExists=/sys/firmware/efi/efivars/StubPcrKernelImage-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f
 
index e437c7e1ce9eacb3eca658d6687d510dd7fb9cb2..6320dccf27d670697ac1c36cb84810b543318dde 100644 (file)
@@ -13,7 +13,7 @@ Documentation=man:systemd-pcrphase-initrd.service(8)
 DefaultDependencies=no
 Conflicts=shutdown.target initrd-switch-root.target
 Before=sysinit.target cryptsetup-pre.target cryptsetup.target shutdown.target initrd-switch-root.target systemd-sysext.service
-AssertPathExists=/etc/initrd-release
+ConditionPathExists=/etc/initrd-release
 ConditionSecurity=tpm2
 ConditionPathExists=/sys/firmware/efi/efivars/StubPcrKernelImage-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f
 
index a22fbbe935c968b5ef207355cb6a1efc3596fd0e..f00ad61257435b9fe7f4a7da3e80392e12a16d06 100644 (file)
@@ -14,7 +14,7 @@ DefaultDependencies=no
 Conflicts=shutdown.target
 After=sysinit.target
 Before=basic.target shutdown.target
-AssertPathExists=!/etc/initrd-release
+ConditionPathExists=!/etc/initrd-release
 ConditionSecurity=tpm2
 ConditionPathExists=/sys/firmware/efi/efivars/StubPcrKernelImage-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f
 
index 5ba437e5b18ee601ba6edd4aae89cb82bb0d4e14..558f268857a44ebe5b9d02ec6ba3b648389a84cb 100644 (file)
@@ -12,7 +12,7 @@ Description=TPM2 PCR Barrier (User)
 Documentation=man:systemd-pcrphase.service(8)
 After=remote-fs.target remote-cryptsetup.target
 Before=systemd-user-sessions.service
-AssertPathExists=!/etc/initrd-release
+ConditionPathExists=!/etc/initrd-release
 ConditionSecurity=tpm2
 ConditionPathExists=/sys/firmware/efi/efivars/StubPcrKernelImage-4a67b082-0a4c-41cf-b6c7-440b29bb8c4f