home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2007 January, February, March & April
/
Chip-Cover-CD-2007-02.iso
/
boot
/
i386
/
rescue
/
etc
/
profile.d
/
sh.ssh
< prev
next >
Wrap
Text File
|
2006-11-29
|
625b
|
27 lines
#
# Check if a login was requested by a ssh. If this is
# true and a locale was provided by the ssh the variable
# SSH_SENDS_LOCALE is set to yes and will be exported
# to all sub shells and processes.
#
test_lc()
{
for lc in LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE \
LC_MONETARY LC_MESSAGES LC_PAPER LC_NAMELC_ADDRESS \
LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL
do
eval val="\$$lc"
if test -n "$val" ; then
unset lc val
return 0
fi
done
unset lc val
return 1
}
if test -n "$SSH_TTY" && test_lc ; then
SSH_SENDS_LOCALE=yes
export SSH_SENDS_LOCALE
fi