fix: use double brackets for if clause with and & or concatenation

Previous does not work with Bash version 5.2.15(1)-release (x86_64-pc-linux-gnu)
This commit is contained in:
Gitsarry 2024-08-12 23:56:14 +02:00 committed by Martin Wimpress
parent 42c90e9771
commit 790484cb7d
1 changed files with 2 additions and 2 deletions

View File

@ -1462,8 +1462,8 @@ EOF
echo "disk_size=\"64G\"" >> "${CONF_FILE}"
fi
# Enable TPM for Windows 11
if [ "${OS}" == "windows" ] && [ "${RELEASE}" == "11" ] || [ "${OS}" == "windows-server" ] && [ "${RELEASE}" == "2022" ]; then
# Enable TPM for Windows 11 and Windows Server 2022
if [[ "${OS}" == "windows" && "${RELEASE}" == "11" || "${OS}" == "windows-server" && "${RELEASE}" == "2022" ]]; then
echo "tpm=\"on\"" >> "${CONF_FILE}"
echo "secureboot=\"off\"" >> "${CONF_FILE}"
fi