
# @(#) $Revision: 1.160 $    

# Default (example of) system-wide profile file (/usr/bin/sh initialization).
# This should be kept to the bare minimum every user needs.

# Ignore HUP, INT, QUIT now.

	trap "" 1 2 3				
	
# Set the default paths - Do NOT modify these.
# Modify the variables through /etc/PATH and /etc/MANPATH 

	PATH=/usr/bin:/usr/ccs/bin:/usr/contrib/bin 
	MANPATH=/usr/share/man:/usr/contrib/man:/usr/local/man

# Insure PATH contains either /usr/bin or /sbin (if /usr/bin is not available).

	if [ ! -d /usr/sbin ]
	then
		PATH=$PATH:/sbin

	else 	if [ -r /etc/PATH ]
		then

		# Insure that $PATH includes /usr/bin .  If /usr/bin is 
		# present in /etc/PATH then $PATH is set to the contents 
		# of /etc/PATH.  Otherwise, add the contents of /etc/PATH 
		# to the end of the default $PATH definition above.

			grep -q -e "^/usr/bin$" -e "^/usr/bin:" -e ":/usr/bin:"\
				-e ":/usr/bin$" /etc/PATH
			if [ $? -eq 0 ]
	               	then
				PATH=`cat /etc/PATH`
			else
       	        		PATH=$PATH:`cat /etc/PATH`
			fi
		fi
	fi

	export PATH

# Set MANPATH to the contents of /etc/MANPATH, if it exists.

	if [ -r /etc/MANPATH ]
	then
		MANPATH=`cat /etc/MANPATH`
	fi

	export MANPATH

# Set the TIMEZONE	

	if [ -r /etc/TIMEZONE ]
	then
	   . /etc/TIMEZONE	
	else
	    TZ=MST7MDT               # change this for local time.  
	    export TZ
	fi

# Be sure that VUE does not invoke tty commands

   if [ ! "$VUE" ]; then

   # set term if it's not set

	if [ "$TERM" = "" -o "$TERM" = "unknown" -o "$TERM" = "dialup"  \
	     -o "$TERM" = "network" ]
	then
		eval `ttytype -s -a`
	fi

	export TERM

   # set erase to ^H, if ERASE is not set
	if [ "$ERASE" = "" ]
	then
		ERASE="^H"
		export ERASE
	fi
	stty erase $ERASE

   # Set up shell environment:

	trap "echo logout" 0


   # Message of the day

	if [ -r /etc/motd ]
	then
		cat /etc/motd
	fi

   # Notify if there is mail

	if [ -f /usr/bin/mail ]
	then
		if mail -e
		then	echo "You have mail."
		fi
	fi

   # Notify if there is news

	if [ -f /usr/bin/news ]
	then news -n
	fi

   fi                                           # if !VUE

# Leave defaults in user environment.

   trap 1 2 3			

