app-crypt/trousers: Skip tscd.service for TPM2 devices

trousers supports TPM 1.2, and fails for TPM 2. This commits
skips the tcsd service if TPM 2 is detected.

Signed-off-by: Sayan Chowdhury <schowdhury@microsoft.com>
This commit is contained in:
Sayan Chowdhury 2021-10-21 21:38:03 +05:30
parent f072be4764
commit 0f2fde9beb

View File

@ -4,6 +4,7 @@ ConditionPathExists=/dev/tpm0
[Service]
User=tss
ExecCondition=/bin/bash -c "/usr/bin/test $(cat /sys/class/tpm/*/tpm_version_major | grep -m 1 1 || echo 0) -eq 1"
ExecStart=/usr/sbin/tcsd -f
[Install]