home *** CD-ROM | disk | FTP | other *** search
/ chilidog.highland.cc.ks.us / chilidog.highland.cc.ks.us.zip / chilidog.highland.cc.ks.us / backup / bradford.20110502.etc.tar.gz / bradford.20110502.etc.tar / etc / profile.d / sh.ssh < prev    next >
Text File  |  2005-03-03  |  625b  |  27 lines

  1. #
  2. # Check if a login was requested by a ssh. If this is
  3. # true and a locale was provided by the ssh the variable 
  4. # SSH_SENDS_LOCALE is set to yes and will be exported
  5. # to all sub shells and processes.
  6. #
  7. test_lc()
  8. {
  9.     for lc in LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE      \
  10.           LC_MONETARY LC_MESSAGES LC_PAPER LC_NAMELC_ADDRESS  \
  11.           LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL
  12.     do
  13.     eval val="\$$lc"
  14.     if test -n "$val" ; then
  15.         unset lc val
  16.         return 0
  17.     fi
  18.     done
  19.     unset lc val
  20.     return 1
  21. }
  22.  
  23. if test -n "$SSH_TTY" && test_lc ; then
  24.     SSH_SENDS_LOCALE=yes
  25.     export SSH_SENDS_LOCALE
  26. fi
  27.