:
#
#	Copyright 1996 NetCon Corporation
#	All Rights Reserved
#
#	NetCon start/stop script
#	Usage: netcon [ start | stop ]
#
PROCS="netcpass netcvt"

PATH=/bin:/usr/bin:/etc:/usr/etc:/usr/local/bin:/usr/local/lib/netcon:

case "$1" in
start)
        echo "Starting NetCon Network Client and Server, Release 6.0"
        echo "Copyright (c) 1986, 1996 NetCon Corp."
 	echo "Copyright (c) 1984, 1994 Regents of the University of California."
	echo "All rights reserved."
###link
	/usr/bin/nm /kernel > /usr/local/lib/netcon/netcsym
	cd /usr/local/bin
###netconfig
#	/usr/local/bin/netcsetnet 0 Novell Standard 802.3
#	/usr/local/bin/netcsetnet 8137 Novell Ethernet TYPE II 8137
#	/usr/local/bin/netcsetnet e0e0 Novell 802.2

###netcpass
	echo "netcpass Started"
###report

	#Start NetCon Server, Terminal Servers 
	cd /usr/local/bin
	(sleep 3;/usr/local/bin/netcvt  > /dev/null 2>&1 &) &
###server
	echo "netcserv Started"
	echo "netcvt  Started"
	echo ""
	# Stick netware file mounts here
###mount
#	/usr/local/bin/netcmount NETWARE:SYS:/ /netware &
	;;

stop)
	echo "NetCon Shutdown..."
	#
	# Find all the daemons
	#
	PX=""
	OR=""
	for P in $PROCS
	do
		PX="$PX$OR$P"
		OR="|"
	done
	PX="/$PX/"

	#
	# Toast them.
	#
	/bin/ps -ax 2>/dev/null | \
		/usr/bin/awk "$PX { print \"kill \" \$1 }" | /bin/sh
	/usr/local/bin/netcrestart -s
	echo "NetCon Shutdown Complete."
	;;

*)
	echo "Usage: $0 [ start | stop ]"
	exit 1
	;;
esac
