From f2d5a51c5b5b9d9fb6d9726693112d87c0152977 Mon Sep 17 00:00:00 2001 From: oreo639 Date: Tue, 13 Sep 2022 10:22:19 -0700 Subject: [PATCH] base-files: don't overwrite existing locale and define default LANG --- srcpkgs/base-files/files/locale.sh | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/srcpkgs/base-files/files/locale.sh b/srcpkgs/base-files/files/locale.sh index 8486367bfabf..bf266eefa1d1 100644 --- a/srcpkgs/base-files/files/locale.sh +++ b/srcpkgs/base-files/files/locale.sh @@ -1,9 +1,15 @@ # Sets up locale system settings from /etc/locale.conf. # -if [ -s /etc/locale.conf ]; then - . /etc/locale.conf + +if [ -z "$LANG" ]; then + if [ -s /etc/locale.conf ]; then + . /etc/locale.conf + fi fi +# define default LANG to C if not already defined +LANG=${LANG:-C} + export LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY export LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT export LC_INDENTIFICATION