Initial add of defaria.com
[clearscm.git] / defaria.com / Computers / code / adm / etc / profile
1 PATH=".:/usr/local/bin:/usr/bin:$PATH"
2
3 # Check for /etc/site_parms and if found use the tools path there
4 # Set site_parms (if present)
5 if [ -f /etc/site_parms ]; then
6   . /etc/site_parms
7   PATH="$PATH:$SITE_TOOLS_PATH/bin"
8 else
9   # Otherwise warn user and use the old tools path
10   echo "WARNING: Count not find /etc/site_parms!"
11   PATH="$PATH://sonscentral/Corporate/Software/bin"
12 fi
13
14 # Get the proper values for HOME and SHELL
15 USER="`id -un`"
16 HOME=`grep ^$USER: /etc/passwd | cut -f6 -d:`
17 SHELL=`grep ^$USER: /etc/passwd | cut -f7 -d:`
18
19 # Set up USER's home directory
20 if [ -z "$HOME" ]; then
21   echo "WARNING: HOME not set! Defaulting to /tmp"
22   HOME="/tmp"
23 fi
24
25 # Check to see if USER's home directory exists
26 if [ ! -d "$HOME" ]; then
27   echo "WARNING: HOME directory did not exist! Logging in with HOME = /tmp"
28   HOME="/tmp"
29 fi
30
31 export HOME USER SHELL
32
33 # Set CYGWIN to ntsec. No longer needed as of Cygwin 1.3.20 however
34 # we will have users with old versions of Cygwin
35 # Added smbntsec
36 CYGWIN="ntsec smbntsec"
37 export CYGWIN
38
39 # Execute other system startup scripts
40 for i in /etc/profile.d/*.sh ; do
41   if [ -f $i ]; then
42     . $i
43   fi
44 done
45
46 # Set MAKE_MODE for Unix and set a default PS1 string
47 export MAKE_MODE=unix
48 export PS1='\[\033]0;\w\007
49 \033[32m\]\u@\h \[\033[33m\w\033[0m\]
50 $ '
51
52 # Go to user's home directory
53 cd "$HOME"
54
55 # Execute users .bashrc, if it exists
56 test -f "$HOME/.bashrc" && . "$HOME/.bashrc"