From 24c5d54f49858a1e0811fd59c0fcefedaad33de9 Mon Sep 17 00:00:00 2001 From: David Duque Date: Mon, 10 Aug 2020 03:07:45 +0100 Subject: [PATCH] start.sh: Generate locales properly --- setup/start.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/setup/start.sh b/setup/start.sh index cedc426d..404e0410 100755 --- a/setup/start.sh +++ b/setup/start.sh @@ -14,9 +14,14 @@ source setup/preflight.sh # Python may not be able to read/write files. This is also # in the management daemon startup script and the cron script. +# Make sure we have locales at all (some images are THAT minimal) +apt_get_quiet install locales + if ! locale -a | grep en_US.utf8 > /dev/null; then + echo "Generating locales..." # Generate locale if not exists - hide_output locale-gen en_US.UTF-8 + echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen + hide_output locale-gen fi export LANGUAGE=en_US.UTF-8