diff options
Diffstat (limited to 'tests/tpm2dtests/start_sw_tpm.sh')
-rwxr-xr-x | tests/tpm2dtests/start_sw_tpm.sh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/tpm2dtests/start_sw_tpm.sh b/tests/tpm2dtests/start_sw_tpm.sh index 36e1a806e..fc86801e2 100755 --- a/tests/tpm2dtests/start_sw_tpm.sh +++ b/tests/tpm2dtests/start_sw_tpm.sh @@ -3,12 +3,15 @@ # remove any prior TPM contents rm -f NVChip h*.bin *.permall if [ -x "${SWTPM}" ]; then - ${SWTPM} socket --tpm2 --server type=tcp,port=2321 \ - --ctrl type=tcp,port=2322 --tpmstate dir=`pwd` & + ${SWTPM} socket --tpm2 --daemon \ + --pid file=swtpm.pid \ + --server type=tcp,port=2321 \ + --ctrl type=tcp,port=2322 --tpmstate dir=`pwd` + pid=$(cat swtpm.pid) else ${TPMSERVER} > /dev/null 2>&1 & + pid=$! fi -pid=$! ## # This powers on the tpm and starts it # then we derive the RSA version of the storage seed and |