diff options
author | Bill Nottingham <notting@redhat.com> | 2008-04-29 11:48:38 -0400 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2008-04-29 11:48:38 -0400 |
commit | 39d1593aad51817f5b64a9e95f2144dfaa018ebb (patch) | |
tree | 76b654e6882cffa74ccab957c69a15ca53f5e98b /lang.sh | |
parent | 98a6595a35e51c34bee9c66ab8d9fc4302d3301c (diff) | |
download | initscripts-39d1593aad51817f5b64a9e95f2144dfaa018ebb.tar initscripts-39d1593aad51817f5b64a9e95f2144dfaa018ebb.tar.gz initscripts-39d1593aad51817f5b64a9e95f2144dfaa018ebb.tar.bz2 initscripts-39d1593aad51817f5b64a9e95f2144dfaa018ebb.tar.xz initscripts-39d1593aad51817f5b64a9e95f2144dfaa018ebb.zip |
Canonicalize the behavior. (#372151)initscripts-8.74-1
If no LANG is set, read system and then user configuration.
If an existing one is set (via GDM, ssh, etc.) only read the
user-specific customizations.
Diffstat (limited to 'lang.sh')
-rwxr-xr-x | lang.sh | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -2,15 +2,16 @@ sourced=0 -saved_lang="$LANG" -for langfile in /etc/sysconfig/i18n $HOME/.i18n ; do - [ -f $langfile ] && . $langfile && sourced=1 -done - -if [ -n "$saved_lang" ]; then +if [ -n "$LANG" ]; then + saved_lang="$LANG" + [ -f $HOME/.i18n ] && . $HOME/.i18n && sourced=1 LANG="$saved_lang" + unset saved_lang +else + for langfile in /etc/sysconfig/i18n $HOME/.i18n ; do + [ -f $langfile ] && . $langfile && sourced=1 + done fi -unset saved_lang if [ "$sourced" = 1 ]; then [ -n "$LANG" ] && export LANG || unset LANG |