feat: create tpm_param_check()

This commit is contained in:
Martin Wimpress 2024-05-13 17:40:41 +01:00 committed by Martin Wimpress
parent 6d44ca8c2d
commit 44e653a48d
1 changed files with 10 additions and 0 deletions

View File

@ -1474,6 +1474,16 @@ function sound_card_param_check() {
fi 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() { function viewer_param_check() {
if [ "${viewer}" != "none" ] && [ "${viewer}" != "spicy" ] && [ "${viewer}" != "remote-viewer" ]; then if [ "${viewer}" != "none" ] && [ "${viewer}" != "spicy" ] && [ "${viewer}" != "remote-viewer" ]; then
echo "ERROR! Requested viewer '${viewer}' is not recognised." echo "ERROR! Requested viewer '${viewer}' is not recognised."