fix: Check swtpm (#390)

This commit is contained in:
Kroese 2024-01-26 02:22:26 +01:00 committed by GitHub
parent 45310252dd
commit 39a84b8215
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -68,7 +68,9 @@ if [[ "${BOOT_MODE,,}" != "legacy" ]] && [[ "${BOOT_MODE,,}" != "windows_legacy"
mkdir -p /run/shm/tpm
chmod 755 /run/shm/tpm
swtpm socket -t -d --tpmstate dir=/run/shm/tpm --ctrl type=unixio,path=/run/swtpm-sock --pid file=/var/run/tpm.pid --tpm2
if ! swtpm socket -t -d --tpmstate dir=/run/shm/tpm --ctrl type=unixio,path=/run/swtpm-sock --pid file=/var/run/tpm.pid --tpm2; then
error "Failed to start TPM emulator, reason: $?" && exit 19
fi
for (( i = 1; i < 20; i++ )); do