#!/bin/csh -f
# 
# the above line is just in case we're running this as a script.
# normally it'll be run as .cshrc.
#


set count=`ps -a| fgrep vaxpdb | wc -l`
if ($count >= 4) then
        echo "TechInfo has reached it's current limit, and cannot service"
	echo "more users at this time.  Please try again later."
	sleep 5
	logout
else
	stty dec
	if ($term == xterm) then
		stty rows 24
	else
	if ($term == network) then
		set term = vt100
	else
	if ($term == unknown) then
		echo -n "Terminal type [$term]: "
		set term = $<
	endif
	endif
	endif
	echo -n  "Executing TechInfo ... "
	exec techinfo
endif

