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.20110725.etc.tar.gz / bradford.20110725.etc.tar / etc / profile.d / profile.csh < prev    next >
Text File  |  2006-01-25  |  3KB  |  123 lines

  1. #
  2. # profile.csh:         Set interactive profile environment
  3. #
  4. # Used configuration files:
  5. #
  6. #     /etc/sysconfig/windowmanager
  7. #     /etc/sysconfig/suseconfig
  8. #     /etc/sysconfig/mail
  9. #     /etc/sysconfig/proxy
  10. #     /etc/sysconfig/console
  11. #
  12.  
  13. set noglob
  14. set sysconf=""
  15. foreach sys (/etc/sysconfig/windowmanager    \
  16.          /etc/sysconfig/suseconfig        \
  17.          /etc/sysconfig/mail        \
  18.          /etc/sysconfig/proxy        \
  19.          /etc/sysconfig/console)
  20.     if (! -s ${sys:q} ) continue
  21.     set sysconf="${sysconf} ${sys}"
  22. end
  23. unset sys
  24.  
  25. set val=""
  26. foreach line ( "`grep -vh '^#' $sysconf`" )
  27.     set val="${line:q:s/=/ /}"
  28.     set arr=( $val )
  29.     eval set val="${arr[2-]}"
  30.     switch (${line:q})
  31.     case CWD_IN_ROOT_PATH=*:
  32.     if ( ${line:q} !~ *=*yes* ) continue
  33.     if ( "$path[*]" =~ *.* )    continue
  34.     if ( $uid <  100 ) set -l path=( $path . )
  35.     breaksw
  36.     case CWD_IN_USER_PATH=*:
  37.     if ( ${line:q} !~ *=*yes* ) continue
  38.     if ( "$path[*]" =~ *.* )    continue
  39.     if ( $uid >= 100 ) set -l path=( $path . )
  40.     breaksw
  41.     case FROM_HEADER=*:
  42.     setenv FROM_HEADER ${val:q}
  43.     breaksw
  44.     case SCANNER_TYPE=*:
  45.     setenv SCANNER_TYPE ${val:q}
  46.     breaksw
  47.     case PROXY_ENABLED=*:
  48.     set proxy_enabled=${val:q}
  49.     breaksw
  50.     case HTTP_PROXY=*:
  51.     if (! ${%val} ) continue
  52.     setenv http_proxy ${val:q}
  53.     breaksw
  54.     case HTTPS_PROXY=*:
  55.     if (! ${%val} ) continue
  56.     setenv https_proxy ${val:q}
  57.     breaksw
  58.     case FTP_PROXY=*:
  59.     if (! ${%val} ) continue
  60.     setenv ftp_proxy ${val:q}
  61.     breaksw
  62.     case GOPHER_PROXY=*:
  63.     if (! ${%val} ) continue
  64.     setenv gopher_proxy ${val:q}
  65.     breaksw
  66.     case NO_PROXY=*:
  67.     if (! ${%val} ) continue
  68.     setenv no_proxy ${val:q}
  69.     breaksw
  70.     case DEFAULT_WM=*:
  71.     set default_wm=${val:q}
  72.     breaksw
  73.     case CONSOLE_MAGIC=*:
  74.     set console_magic=${val:q}
  75.     breaksw
  76.     default:
  77.     breaksw
  78.     endsw
  79. end
  80. unset sysconf line
  81.  
  82. if ( -d /usr/lib/dvgt_help ) then
  83.     setenv DV_IMMED_HELP /usr/lib/dvgt_help
  84. endif
  85.  
  86. if ( -d /usr/lib/rasmol ) then
  87.     setenv RASMOLPATH /usr/lib/rasmol
  88. endif
  89.  
  90. if ( ${?proxy_enabled} ) then
  91.     if ( "$proxy_enabled" != "yes" ) then
  92.     unsetenv http_proxy https_proxy ftp_proxy gopher_proxy no_proxy
  93.     endif
  94.     unset proxy_enabled
  95. endif
  96.  
  97. #
  98. # Do not use the `which' builtin nor set path to avoid a rehash
  99. #
  100. if (! ${?default_wm} ) set default_wm
  101. if ( ${%default_wm} > 0 && ! ${?WINDOWMANAGER} ) then
  102.     set default_wm=${default_wm:t}
  103.     foreach val ($path /usr/X11R6/bin /opt/gnome/bin /usr/openwin/bin)
  104.     if ( ${val:q} =~ *.* ) continue
  105.     set val=${val:q}/${default_wm:q}
  106.     if ( ! -x ${val:q} ) continue
  107.     setenv WINDOWMANAGER ${val:q}
  108.     break
  109.     end
  110.     unset val
  111. endif
  112. unset default_wm
  113.  
  114. if ( ${?loginsh} && ${?console_magic} && "$tty" =~ tty* ) then
  115.     if ( "$TERM" == "linux" && -o /dev/$tty ) then
  116.     echo -n "\033$console_magic"
  117.     endif
  118. endif
  119.  
  120. unset noglob
  121. #
  122. # end of profile.csh
  123.