#! /bin/sh
# Copyright (c) 1996 StarDivision GmbH. All rights reserved.
# Copyright (c) 1996 S.u.S.E. Gmbh Fuerth, Germany. All rights reserved.
#
# Author: Volker Lendecke, <vl@suse.de>
#

. /etc/rc.config
test "$START_MARSNWE" = yes || exit 0

case "$1" in
	start)
		echo -n "Starting NetWare Emulation services."
		if [ -f /proc/net/ipx ] ; then
			/usr/sbin/nwserv > /dev/null
		else
			echo
			echo	
			echo "  Please enable IPX in your kernel"
			echo "  NetWare Emulation services not started"
		fi
		echo
		;;
	stop)
		echo -n "Shutting down NetWare Emulation services."
                killproc -TERM /usr/sbin/nwserv
		sleep 8
		rm -f /var/run/nwserv.pid
		echo
		;;
	*)
		echo "Usage: $0 {start|stop}"
		exit 1
esac

exit 0
