summaryrefslogtreecommitdiff
path: root/locale.sh
diff options
context:
space:
mode:
Diffstat (limited to 'locale.sh')
-rw-r--r--locale.sh12
1 files changed, 4 insertions, 8 deletions
diff --git a/locale.sh b/locale.sh
index fe82378..c465f6f 100644
--- a/locale.sh
+++ b/locale.sh
@@ -4,16 +4,12 @@ if [ -s /etc/locale.conf ]; then
. /etc/locale.conf
fi
-if [ -n "$LANG" ]; then
- export LANG
-else
- if [ -s /etc/rc.conf ]; then
- export LANG=$(. /etc/rc.conf 2> /dev/null ; echo "$LOCALE")
- else
- export LANG="C"
- fi
+if [ -z "$LANG" ] && [ -s /etc/rc.conf ]; then
+ LANG=$(. /etc/rc.conf 2>/dev/null; echo "$LOCALE")
fi
+export LANG=${LANG:-C}
+
if [ -n "$LC_CTYPE" ]; then
export LC_CTYPE
else