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 < prev    next >
Text File  |  2006-04-25  |  8KB  |  344 lines

  1. # /etc/profile for SuSE Linux
  2. #
  3. # PLEASE DO NOT CHANGE /etc/profile. There are chances that your changes
  4. # will be lost during system upgrades. Instead use /etc/profile.local for
  5. # your local settings, favourite global aliases, VISUAL and EDITOR
  6. # variables, etc ...
  7.  
  8. #
  9. # Check which shell is reading this file
  10. #
  11. if test -f /proc/mounts ; then
  12.   case "`/bin/ls -l /proc/$$/exe`" in
  13.     */bash)    is=bash ;;
  14.     */rbash)    is=bash ;;
  15.     */ash)    is=ash  ;;
  16.     */ksh)    is=ksh  ;;
  17.     */pdksh)    is=ksh  ;;
  18.     */zsh)    is=zsh  ;;
  19.     */*)    is=sh   ;;
  20.   esac
  21. else
  22.   is=sh
  23. fi
  24.  
  25. #
  26. # Initialize terminal
  27. #
  28. tty=`tty 2> /dev/null`
  29. test $? -ne 0 && tty=""
  30. if test -O "$tty" -a -n "$PS1"; then
  31.     test -z "${TERM}"        && { TERM=linux; export TERM; }
  32.     test "${TERM}" = "unknown"    && { TERM=linux; export TERM; }
  33.     # Do not change settings on local line if connected to remote
  34.     if test -z "$SSH_TTY" ; then
  35.     test -x /bin/stty     && /bin/stty sane cr0 pass8 dec
  36.     test -x /usr/bin/tset && /usr/bin/tset -I -Q
  37.     fi
  38.     # on iSeries virtual console, detect screen size and terminal
  39.     if test -d /proc/iSeries -a \( "$tty" = "/dev/tty1" -o "$tty" = "/dev/console" \) ; then
  40.         LINES=24
  41.     COLUMNS=80
  42.     export LINES COLUMNS TERM
  43.         if test -x /bin/initviocons ; then
  44.          eval `/bin/initviocons -q -e`
  45.     fi
  46.     fi
  47. fi
  48. unset TERMCAP
  49.  
  50. #
  51. # Time until a complete key sequence must have arrived
  52. #
  53. #ESCDELAY=2000
  54. #export ESCDELAY
  55.  
  56. #
  57. # The user file-creation mask
  58. #
  59. umask 022
  60.  
  61. #
  62. # Setup for gzip and (t)csh users
  63. #
  64. if test -z "$PROFILEREAD" ; then
  65.     # GZIP=-9
  66.     # export GZIP
  67.     CSHEDIT=emacs
  68.     export CSHEDIT
  69. fi
  70.  
  71. #
  72. # ksh/ash sometimes do not know
  73. #
  74. test -z "$UID"  && readonly  UID=`id -ur 2> /dev/null`
  75. test -z "$EUID" && readonly EUID=`id -u  2> /dev/null`
  76. test -z "$USER" && USER=`id -un 2> /dev/null`
  77. test -z "$MAIL" && MAIL=/var/spool/mail/$USER
  78. test -z "$HOST" && HOST=`/bin/hostname -s 2> /dev/null`
  79. test -z "$CPU"  &&  CPU=`/bin/uname -m 2> /dev/null`
  80. test -z "$HOSTNAME" && HOSTNAME=`/bin/hostname 2> /dev/null`
  81. test -z "$LOGNAME"  && LOGNAME=$USER
  82. case "$CPU" in
  83.     i?86) HOSTTYPE=i386   ;;
  84.     *)    HOSTTYPE=${CPU} ;;
  85. esac
  86.   OSTYPE=linux
  87. MACHTYPE=${CPU}-suse-${OSTYPE}
  88. # Do NOT export UID, EUID, USER, and LOGNAME
  89. export MAIL HOST CPU HOSTNAME HOSTTYPE OSTYPE MACHTYPE
  90.  
  91. #
  92. # You may use /etc/initscript, /etc/profile.local or the
  93. # ulimit package instead to set up ulimits and your PATH.
  94. #
  95. # if test "$is" != "ash" -a ! -r /etc/initscript; then
  96. #     ulimit -Sc 0        # don't create core files
  97. #     ulimit -Sd $(ulimit -Hd)
  98. #     ulimit -Ss $(ulimit -Hs)
  99. #     ulimit -Sm $(ulimit -Hm)
  100. # fi
  101.  
  102. #
  103. # Make path more comfortable
  104. #
  105. if test -z "$PROFILEREAD" ; then
  106.     PATH=/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin
  107.     if test "$HOME" != "/" ; then
  108.     for dir in $HOME/bin/$CPU $HOME/bin ; do
  109.         test -d $dir && PATH=$dir:$PATH
  110.     done
  111.     fi
  112.     if test "$UID" = 0 ; then
  113.     test -d /opt/gnome/sbin && PATH=/opt/gnome/sbin:$PATH
  114.     test -d /opt/kde3/sbin  && PATH=/opt/kde3/sbin:$PATH
  115.     PATH=/sbin:/usr/sbin:/usr/local/sbin:$PATH
  116.     fi
  117.     for dir in  /var/lib/dosemu \
  118.         /usr/games \
  119.         /opt/bin \
  120.         /opt/gnome/bin \
  121.         /opt/kde3/bin \
  122.         /opt/kde2/bin \
  123.         /opt/kde/bin \
  124.         /usr/openwin/bin \
  125.         /opt/cross/bin
  126.     do
  127.     test -d $dir && PATH=$PATH:$dir
  128.     done
  129.     unset dir
  130.     export PATH
  131. fi
  132.  
  133. #
  134. # Many programs using readline library for line editing
  135. # should know about this (e.g. bash)
  136. #
  137. if test -z "$INPUTRC" ; then
  138.     INPUTRC=/etc/inputrc
  139.     test -s $HOME/.inputrc && INPUTRC=$HOME/.inputrc
  140.     export INPUTRC
  141. fi
  142.  
  143. #
  144. # Most bourn shell clones knows about this
  145. #
  146. if test -z "$PROFILEREAD" ; then
  147.     HISTSIZE=1000
  148.     export HISTSIZE
  149. fi
  150.  
  151. #
  152. # Set some environment variables for TeX/LaTeX
  153. #
  154. if test -n "$TEXINPUTS" ; then
  155.     TEXINPUTS=":$TEXINPUTS:$HOME/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX"
  156. else
  157.     TEXINPUTS=":$HOME/.TeX:/usr/share/doc/.TeX:/usr/doc/.TeX"
  158. fi
  159. export TEXINPUTS
  160.  
  161. #
  162. # Configure the default pager on SuSE Linux
  163. #
  164. if test -z "$LESS" ; then
  165.     LESS="-M -I"
  166.     LESSOPEN="lessopen.sh %s"
  167.     LESSCLOSE="lessclose.sh %s %s"
  168.     LESS_ADVANCED_PREPROCESSOR="no"
  169.     if test -s /etc/lesskey.bin ; then
  170.     LESSKEY=/etc/lesskey.bin
  171.     fi
  172.     PAGER=less
  173.     MORE=-sl
  174.     export LESSOPEN LESSCLOSE LESS LESSKEY PAGER LESS_ADVANCED_PREPROCESSOR MORE
  175. fi
  176.  
  177. #
  178. # Minicom 
  179. #
  180. if test -z "$PROFILEREAD" ; then
  181.     MINICOM="-c on"
  182.     export MINICOM
  183. fi
  184.  
  185. #
  186. # Current manpath
  187. #
  188. if test -z "$PROFILEREAD" ; then
  189.     tmp="$MANPATH"
  190.     unset MANPATH
  191.     if test -n "$tmp" ; then
  192.     MANPATH="${tmp}:`test -x /usr/bin/manpath && /usr/bin/manpath -q`"
  193.     else
  194.     MANPATH="`test -x /usr/bin/manpath && /usr/bin/manpath -q`"
  195.     fi
  196.     unset tmp
  197.     export MANPATH
  198. fi
  199.  
  200. #
  201. # Some applications do not handle the XAPPLRESDIR environment properly,
  202. # when it contains more than one directory. More than one directory only
  203. # makes sense if you have a client with /usr mounted via nfs and you want
  204. # to configure applications machine dependent. Uncomment the lines below
  205. # if you want this.
  206. #
  207. #XAPPLRESDIR="$XAPPLRESDIR:/var/X11R6/app-defaults:/usr/X11R6/lib/X11/app-defaults"
  208. #export XAPPLRESDIR
  209.  
  210. #
  211. # Set INFOPATH to tell xemacs where he can find the info files
  212. #
  213. if test -z "$PROFILEREAD" ; then
  214.     tmp="$INFODIR"
  215.     if test -n "$tmp" ; then
  216.     INFODIR="${tmp}:/usr/local/info:/usr/share/info:/usr/info"
  217.     else
  218.     INFODIR="/usr/local/info:/usr/share/info:/usr/info"
  219.     fi
  220.     INFOPATH=$INFODIR
  221.     unset tmp
  222.     export INFODIR INFOPATH
  223. fi
  224.  
  225. #
  226. # These settings are recommended for old motif applications
  227. #
  228. if test -z "$PROFILEREAD" ; then
  229.     XKEYSYMDB=/usr/X11R6/lib/X11/XKeysymDB
  230.     export XKEYSYMDB
  231.     XNLSPATH=/usr/X11R6/lib/X11/nls
  232.     export XNLSPATH
  233. fi
  234.  
  235. if test -s /etc/nntpserver ; then
  236.     read NNTPSERVER < /etc/nntpserver
  237.     export NNTPSERVER
  238. else
  239.     NNTPSERVER=news
  240.     export NNTPSERVER
  241. fi
  242.  
  243. if test -s /etc/organization ; then
  244.     read ORGANIZATION < /etc/organization
  245.     export ORGANIZATION
  246. fi
  247.  
  248. #
  249. # Midnight Commander needs this to run in color mode
  250. #
  251. if test -z "$PROFILEREAD" ; then
  252.     COLORTERM=1
  253.     export COLORTERM
  254. fi
  255.  
  256. #
  257. # For RCS
  258. #
  259. #VERSION_CONTROL=numbered
  260. #export VERSION_CONTROL
  261.  
  262. #
  263. # Source the files generated by SuSEconfig
  264. #
  265. # But do not source this if PROFILEREAD is already set to avoid
  266. # overriding locale variables already present in the environment
  267. #
  268. if test -z "$PROFILEREAD" ; then
  269.     test -r /etc/profile.d/sh.ssh   && . /etc/profile.d/sh.ssh
  270.     test -r /etc/SuSEconfig/profile && . /etc/SuSEconfig/profile
  271.     if test -z "$SSH_SENDS_LOCALE" ; then
  272.         if test -r /etc/sysconfig/language -a -r /etc/profile.d/sh.utf8 ; then
  273.         tmp="$(. /etc/sysconfig/language; echo $AUTO_DETECT_UTF8)"
  274.         test "$tmp" = "yes" && . /etc/profile.d/sh.utf8
  275.         unset tmp
  276.     fi
  277.     fi
  278. fi
  279.  
  280. #
  281. # Source profile extensions for certain packages
  282. #
  283. if test -d /etc/profile.d -a -z "$PROFILEREAD" ; then
  284.     for s in /etc/profile.d/*.sh ; do
  285.     test -r $s && . $s
  286.     done
  287.     unset s
  288. fi
  289.  
  290. if test "$is" != "ash" ; then
  291.     #
  292.     # And now let's see if there is a local profile
  293.     # (for options defined by your sysadmin, not SuSE Linux)
  294.     #
  295.     test -s /etc/profile.local && . /etc/profile.local
  296. fi
  297.  
  298. #
  299. # System wide configuration of bourne shells like ash
  300. #
  301. if test "$is" != "ksh" -a -z "$PROFILEREAD" ; then
  302.     ENV=/etc/bash.bashrc
  303.     export ENV
  304. fi
  305.  
  306. #
  307. # Avoid overwriting user settings if called twice
  308. #
  309. if test -z "$PROFILEREAD" ; then
  310.     readonly PROFILEREAD=true
  311.     export PROFILEREAD
  312. fi
  313.  
  314. #
  315. # System BASH specials, maybe also good for other shells
  316. # Note that ksh always reads /etc/ksh.kshrc
  317. #
  318. if test "$is" != ksh -a -r /etc/bash.bashrc ; then
  319.     . /etc/bash.bashrc
  320. fi
  321. if test "$is" = "bash" -a -z "$_HOMEBASHRC" ; then
  322.     # loop detection
  323.     readonly _HOMEBASHRC=true
  324.     test -r $HOME/.bashrc  && . $HOME/.bashrc
  325. fi
  326.  
  327. #
  328. # KSH specials
  329. #
  330. if test "$is" = "ksh" -a -r /etc/ksh.kshrc ; then
  331.     if test ! /etc/bash.bashrc -ef /etc/ksh.kshrc ; then
  332.     test -r /etc/bash.bashrc && . /etc/bash.bashrc
  333.     fi
  334.     if test -n "$ENV" -a "$ENV" != "\$HOME/.kshrc" ; then
  335.     # loop detection
  336.     readonly _HOMEKSHRC=true
  337.     test -r $HOME/.kshrc     && . $HOME/.kshrc
  338.     fi
  339. fi
  340.  
  341. #
  342. # End of /etc/profile
  343. #
  344.