From 44e653a48d637c8a8a821696318bdea55c9d45fd Mon Sep 17 00:00:00 2001 From: Martin Wimpress Date: Mon, 13 May 2024 17:40:41 +0100 Subject: [PATCH] feat: create tpm_param_check() --- quickemu | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/quickemu b/quickemu index 0e644e6..da86ab4 100755 --- a/quickemu +++ b/quickemu @@ -1474,6 +1474,16 @@ function sound_card_param_check() { fi } +function tpm_param_check() { + if [ "${tpm}" == "on" ]; then + SWTPM=$(command -v swtpm) + if [ ! -e "${SWTPM}" ]; then + echo "ERROR! TPM is enabled, but swtpm was not found." + exit 1 + fi + fi +} + function viewer_param_check() { if [ "${viewer}" != "none" ] && [ "${viewer}" != "spicy" ] && [ "${viewer}" != "remote-viewer" ]; then echo "ERROR! Requested viewer '${viewer}' is not recognised."