]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
units: also require /dev/tpm0 to be around before tpm2.target can be reached
authorLennart Poettering <lennart@poettering.net>
Wed, 26 Feb 2025 21:41:34 +0000 (22:41 +0100)
committerLennart Poettering <lennart@poettering.net>
Wed, 5 Mar 2025 11:37:48 +0000 (12:37 +0100)
While we typically just use /dev/tpmrm0 for accessing the TPM chip (i.e
via the kernel's own resource manager), some sysfs properties that
matter are on /dev/tpm0 only (i.e. the version without the kernel TPM
resource manager). Hence, wait for both to show up in tpm2.target, so
that we can be sure the full API is available.

This matters because we want to access /sys/class/tpm/tpm0/ppi/request
in the next commit.

units/tpm2.target

index ba51d5740e6c49b8417274fa5197fde810057d92..86f596fef8ef83df1bd5a103a4570303c28595e2 100644 (file)
@@ -12,5 +12,5 @@ Description=Trusted Platform Module
 Documentation=man:systemd.special(7)
 
 # Make this a synchronization point on the first TPM device found
-After=dev-tpmrm0.device
-Wants=dev-tpmrm0.device
+After=dev-tpmrm0.device dev-tpm0.device
+Wants=dev-tpmrm0.device dev-tpm0.device