
# HPUX_ID: @(#)29.1   86/07/04
#          @(#)graphics.sh	29.1      86/06/19
:
: Graphics environment change
: GRAF directory optionally used for graflog file and announcements.
: r option creates restricted environment.
:
ROOT=/usr/contrib/
GRAF=/usr/adm

if test "$TERM" = 4014
	then ${ROOT}/bin/graf/tekset
fi

if test -w $GRAF/graflog
then
  if  tty>/dev/null
  then
    tty=`tty | sed "s/.*\///"`
    who | grep ${tty} >>${GRAF}/graflog
  else
    who am i >>${GRAF}/graflog
  fi
fi

if test -r ${GRAF}/announce
then  cat ${GRAF}/announce
fi

SHELL=${SHELL:-sh}
if test "$1" != "-r"
then
  PATH=${ROOT}/bin/graf:$PATH PS1="^ " $SHELL $@
else
  PATH=:${ROOT}/bin/graf:${ROOT}/rbin:${ROOT}/usr/rbin:${ROOT}/bin:${ROOT}/usr/bin PS1="^ " rsh $@
fi
