set path=( $HOME/bin /bin /usr/ucb /usr/bin /usr/local/bin /usr/local/X11 )

stty dec new -tostop

if ( `tty` =~ /dev/tty[pqr]? && "$TERM" == "network" ) then
	# Remote login from nunet; wrong terminal type
	set noglob;eval `tset -s -Q -m :?vt100`;unset noglob
else if ( `tty` =~ /dev/tty[pqr]? && "$TERM" != "annex" ) then
	# Remote login; terminal type already known
	set noglob;eval `tset -s -Q $TERM`;unset noglob
else if (`tty` == /dev/console )then
	# Normal login from console
	set noglob;eval `tset -s -Q -m :sun`;unset noglob
	newcookie
else
	# Normal login from terminal
	set noglob;eval `tset -s -Q -m :?twist`;unset noglob
endif

setenv TERMCAP /etc/termcap

limit coredumpsize 0	# No core dumps shall be done in case of errors
mesg y			# Other users are allowed to write to the terminal

if ( -e ~/.../out ) then
  setenv first yes
else
  setenv first no
endif

# If first login
if ( $first == yes ) then
	source ~/.../firstlogin
endif

date "+Logged in at $HOST on $tty  at  %y-%m-%d %H:%M" >> ~/.plan
