#ident	"@(#)kern-i386at:io/dlpi_cpq/cet/sr/nflxsr.cf/S02nflxt	1.3"
#ident	"$Header: $"

# 
# Start/stop Netflex Network Interface Cards (NIC)s that are installed on
# system.  The list of Netflex NICs that are installed on system are obtained
# by openning all Netflex NIC Device Special Files (DFS)s.  A successfull open
# indicates the existence of a NIC.
#
NICLIST=""
nicnum=0 #Netflex NIC DSFs start at 0
for nic in /dev/nflxt_*
do
	( <$nic ) >/dev/null 2>&1
	if [ $? -eq 0 ]
	then
		NICLIST="$NICLIST $nicnum "
		nicnum=` expr $nicnum + 1 `
	else
		#
		#Once an open fails, no need to check for other NIC DSFs
		#since each installed NIC maps to the next availabe NIC DSF
		#in sequential order.

		break
	fi
done
CPQ_LIB=/etc/netflex
case $1 in
start)
	$CPQ_LIB/cet_start nflxt $CPQ_LIB $NICLIST
	/sbin/autopush -f $CPQ_LIB/ap.nflxsr
	;;
stop)
	$CPQ_LIB/cet_stop nflxt $NICLIST
	;;
esac
