aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2007-02-19 22:21:47 +0000
committerHarald Hoyer <harald@redhat.com>2011-04-12 14:11:02 +0200
commit55fd8bdd57f60c98ed3d34ea6645c201e9fb2aaa (patch)
treeb537cbc4f725e2e29a0a5bd4266a375ef0cbfa5e
parentff16de6d9a8f9bbfa8f6a9c468a24cf2100f48b8 (diff)
downloadinitscripts-55fd8bdd57f60c98ed3d34ea6645c201e9fb2aaa.tar
initscripts-55fd8bdd57f60c98ed3d34ea6645c201e9fb2aaa.tar.gz
initscripts-55fd8bdd57f60c98ed3d34ea6645c201e9fb2aaa.tar.bz2
initscripts-55fd8bdd57f60c98ed3d34ea6645c201e9fb2aaa.tar.xz
initscripts-55fd8bdd57f60c98ed3d34ea6645c201e9fb2aaa.zip
if $LANG is set, don't override it (#229102)
-rwxr-xr-xlang.csh8
-rwxr-xr-xlang.sh11
2 files changed, 14 insertions, 5 deletions
diff --git a/lang.csh b/lang.csh
index 3a6a667a..758ac8b9 100755
--- a/lang.csh
+++ b/lang.csh
@@ -1,12 +1,16 @@
# /etc/profile.d/lang.csh - set i18n stuff
set sourced=0
-foreach file (/etc/sysconfig/i18n $HOME/.i18n)
+if ($?LANG) then
+ set sourced=1
+else
+ foreach file (/etc/sysconfig/i18n $HOME/.i18n)
if ( -f $file ) then
eval `grep -v '^[:blank:]*#' $file | sed 's|\([^=]*\)=\([^=]*\)|setenv \1 \2|g' | sed 's|$|;|'`
endif
set sourced=1
-end
+ end
+endif
if ($?GDM_LANG) then
set sourced=1
diff --git a/lang.sh b/lang.sh
index 74c31660..cf02a619 100755
--- a/lang.sh
+++ b/lang.sh
@@ -1,9 +1,14 @@
# /etc/profile.d/lang.sh - set i18n stuff
sourced=0
-for langfile in /etc/sysconfig/i18n $HOME/.i18n ; do
- [ -f $langfile ] && . $langfile && sourced=1
-done
+
+if [ -n "$LANG" ]; then
+ sourced=1
+else
+ for langfile in /etc/sysconfig/i18n $HOME/.i18n ; do
+ [ -f $langfile ] && . $langfile && sourced=1
+ done
+fi
if [ -n "$GDM_LANG" ]; then
sourced=1