set sensible locale default if the user just hit Enter
authormirabilos <t.glaser@tarent.de>
Wed, 18 Sep 2019 01:08:28 +0000 (03:08 +0200)
committermirabilos <mirabilos@evolvis.org>
Wed, 18 Sep 2019 01:08:28 +0000 (03:08 +0200)
posix/mkrpi3b+img.sh

index 071f24b..d331132 100644 (file)
@@ -856,6 +856,13 @@ Press Enter to continue.' 12 72 || :)
                DEBIAN_PRIORITY=low \
                    apt-get --purge -y install --no-install-recommends \
                    console-{common,data,setup} locales
+               # whether the user just hit Enter
+               case $(</etc/default/locale) in
+               (''|'#  File generated by update-locale')
+                       # empty, add sensible default
+                       print -r -- 'LANG="C.UTF-8"' >/etc/default/locale
+                       ;;
+               esac
        EOF
        # adjust CMA size?
        test -n "$setcma" || cat <<-'EOF'