diff --git a/packages/bsp/common/usr/lib/armbian/armbian-firstlogin b/packages/bsp/common/usr/lib/armbian/armbian-firstlogin index 61353b0751..df833a0450 100755 --- a/packages/bsp/common/usr/lib/armbian/armbian-firstlogin +++ b/packages/bsp/common/usr/lib/armbian/armbian-firstlogin @@ -53,6 +53,8 @@ set_timezone_and_locales() TZDATA=$(echo ${RES} | cut -d"," -f1) STATE=$(echo ${RES} | cut -d"," -f2) LOCALES=$(grep territory /usr/share/i18n/locales/* | grep "$STATE" | cut -d ":" -f 1 | cut -d "/" -f 6 | xargs -I{} grep {} /usr/share/i18n/SUPPORTED | grep "\.UTF-8" | cut -d " " -f 1) + # UTF8 is not present everywhere so check again in case it returns empty value + [[ -z "$LOCALES" ]] && LOCALES=$(grep territory /usr/share/i18n/locales/* | grep "$STATE" | cut -d ":" -f 1 | cut -d "/" -f 6 | xargs -I{} grep {} /usr/share/i18n/SUPPORTED | cut -d " " -f 1) CCODE=$(echo ${RES} | cut -d"," -f3 | awk '{print tolower($0)}' | xargs) options=(`echo ${LOCALES}`);