[go: nahoru, domu]

Skip to content

Commit

Permalink
Fix locale for Ubuntu Xenial
Browse files Browse the repository at this point in the history
Previously, core checked for the absence of /etc/default/locale to
determine if a locale needed to be generated an set as the default.
Unfortunately, in Xenial /etc/default/locale exists by default in
a clean installation with a comment that reads:

    # File generated by update-locale

This commit enhances the test for /etc/default/locale to check that
the file contains `LANG=`, ensuring that a default locale is set.

Fixes: dnschneid#2921 and dnschneid#3283
  • Loading branch information
kindrowboat committed Dec 1, 2018
1 parent 38012fd commit c3b93f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion targets/core
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ fixkeyboardmode
install --minimal sudo wget ca-certificates apt-transport-https

# Generate and set default locale
if [ ! -f '/etc/default/locale' ] && hash locale-gen 2>/dev/null; then
if ! grep "LANG=" /etc/default/locale && hash locale-gen 2>/dev/null; then
echo 'LANG=en_US.UTF-8' > '/etc/default/locale'
locale-gen --lang en_US.UTF-8
if [ "${DISTROAKA:-"$DISTRO"}" = 'debian' ]; then
Expand Down

0 comments on commit c3b93f2

Please sign in to comment.