diff --git a/scripts/installscripts/buster-install-default.sh b/scripts/installscripts/buster-install-default.sh index d4b35899e..bd5da1bf9 100644 --- a/scripts/installscripts/buster-install-default.sh +++ b/scripts/installscripts/buster-install-default.sh @@ -759,6 +759,7 @@ check_config_file() { check_variable "WIFIipRouter" fi fi + check_variable "EXISTINGuse" check_variable "AUDIOiFace" @@ -776,6 +777,18 @@ check_config_file() { check_variable "DIRaudioFolders" check_variable "GPIOconfig" + # Feature optional. if config not present, defaults to NO + if [[ -z "${AUTOHOTSPOTconfig}" ]]; then + echo "INFO: \$AUTOHOTSPOTconfig is missing or not set" + else + if [[ "$AUTOHOTSPOTconfig" == "YES" ]]; then + check_variable "AUTOHOTSPOTssid" + check_variable "AUTOHOTSPOTcountryCode" + check_variable "AUTOHOTSPOTpass" + check_variable "AUTOHOTSPOTip" + fi + fi + if [ "${fail}" == "true" ]; then exit 1 fi diff --git a/scripts/installscripts/tests/test_installation.sh b/scripts/installscripts/tests/test_installation.sh index da23da9cc..ba899f855 100755 --- a/scripts/installscripts/tests/test_installation.sh +++ b/scripts/installscripts/tests/test_installation.sh @@ -136,6 +136,18 @@ verify_conf_file() { fi check_variable "MPDconfig" check_variable "DIRaudioFolders" + check_variable "GPIOconfig" + + # Feature optional. if config not present, defaults to NO + if [[ -n "${AUTOHOTSPOTconfig}" ]]; then + echo "\$AUTOHOTSPOTconfig is set to '$AUTOHOTSPOTconfig'" + if [[ "$AUTOHOTSPOTconfig" == "YES" ]]; then + check_variable "AUTOHOTSPOTssid" + check_variable "AUTOHOTSPOTcountryCode" + check_variable "AUTOHOTSPOTpass" + check_variable "AUTOHOTSPOTip" + fi + fi if [ "${fail}" == "true" ]; then exit 1