diff --git a/packages/bsp/common/usr/lib/armbian/armbian-firstlogin b/packages/bsp/common/usr/lib/armbian/armbian-firstlogin index e38d95acf2..dc79a1a76a 100755 --- a/packages/bsp/common/usr/lib/armbian/armbian-firstlogin +++ b/packages/bsp/common/usr/lib/armbian/armbian-firstlogin @@ -139,8 +139,11 @@ set_timezone_and_locales() CCODE=$(echo ${RES} | cut -d"," -f3 | xargs) echo -e "Detected timezone: \x1B[92m$TZDATA\x1B[0m" echo "" - read -n1 -s -r -p "Set user language based on your location? [Y/n] " response - echo "" + 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 "" + done # change it only if we have a match and if we agree if [[ "${response}" =~ ^(N|n)$ ]]; then unset CCODE TZDATA @@ -402,7 +405,7 @@ if [[ -f /root/.not_logged_in_yet && -n $(tty) ]]; then # select budgie session [[ -x $(command -v budgie-desktop) ]] && sed -i "s/user-session.*/user-session=budgie-desktop/" /etc/lightdm/lightdm.conf.d/11-armbian.conf - [[ -x $(command -v budgie-desktop) ]] && sed -i "s/user-session.*/user-session=budgie-desktop/" /etc/lightdm/lightdm.conf.d/22-armbian-autologin.conf + [[ -x $(command -v budgie-desktop) ]] && sed -i "s/user-session.*/user-session=budgie-desktop/" /etc/lightdm/lightdm.conf.d/22-armbian-autologin.conf # select deepin session [[ -x $(command -v deepin-wm) ]] && sed -i "s/user-session.*/user-session=deepin/" /etc/lightdm/lightdm.conf.d/11-armbian.conf @@ -410,7 +413,7 @@ if [[ -f /root/.not_logged_in_yet && -n $(tty) ]]; then # select cinnamon session [[ -x $(command -v cinnamon) ]] && sed -i "s/user-session.*/user-session=cinnamon/" /etc/lightdm/lightdm.conf.d/11-armbian.conf - [[ -x $(command -v cinnamon) ]] && sed -i "s/user-session.*/user-session=cinnamon/" /etc/lightdm/lightdm.conf.d/22-armbian-autologin.conf + [[ -x $(command -v cinnamon) ]] && sed -i "s/user-session.*/user-session=cinnamon/" /etc/lightdm/lightdm.conf.d/22-armbian-autologin.conf # select mate session [[ -x $(command -v mate-wm) ]] && sed -i "s/user-session.*/user-session=mate/" /etc/lightdm/lightdm.conf.d/11-armbian.conf