diff --git a/packages/bsp/common/usr/lib/armbian/armbian-firstlogin b/packages/bsp/common/usr/lib/armbian/armbian-firstlogin index ff1ab38e17..750afe40b0 100644 --- a/packages/bsp/common/usr/lib/armbian/armbian-firstlogin +++ b/packages/bsp/common/usr/lib/armbian/armbian-firstlogin @@ -119,9 +119,13 @@ set_timezone_and_locales() if [[ -n "$WIFI_DEVICE" ]]; then echo -e "Internet connection was \x1B[91mnot detected\x1B[0m." echo "" - read -n1 -s -r -p "Connect via wireless? [Y/n] " response - echo "" - if [[ "${response}" =~ ^(Y|y|"")$ ]]; then + unset response + while [[ ! "${response}" =~ ^(Y|y|N|n)$ ]]; do + read -n1 -s -r -p "Connect via wireless? [Y/n] " response + response=${response:-Y} + echo "$response" + done + if [[ "${response}" =~ ^(Y|y)$ ]]; then nmtui-connect fi echo "" @@ -148,7 +152,8 @@ set_timezone_and_locales() unset response while [[ ! "${response}" =~ ^(Y|y|N|n)$ ]]; do read -n1 -s -r -p "Set user language based on your location? [Y/n] " response - echo "" + response=${response:-Y} + echo "$response" done # change it only if we have a match and if we agree if [[ "${response}" =~ ^(N|n)$ ]]; then