#!/bin/sh
#
# ident "@(#)rc.skipes	1.8 98/10/05 Sun Microsystems"
#
# start/stop SKIP for Solaris
#

SKIP_HOST=/usr/sbin/skiphost
SKIPES_CONF=/etc/skip//skipes.conf
SKIP_LOG=/var/log/skipd.log

# kill the named process(es)
#
killproc() {		
	pid=`/usr/bin/ps -e |
	     /usr/bin/grep $1 |
	     /usr/bin/sed -e 's/^  *//' -e 's/ .*//'`
	[ "$pid" != "" ] && kill $pid
}

case "$1" in

'start')
	# Check if we need to set up special paremeters
	#
	if [ -f $SKIPES_CONF ]
	then
		/bin/sh $SKIPES_CONF >/dev/null
	fi
	;;

'stop')
	# Stop the SKIP logger if any
	#
	killproc skiplog
	if [ -x $SKIP_HOST ]; then
		$SKIP_HOST -u > /dev/console
	fi
	#/usr/sbin/modunload -i 0

	;;
*)
	/bin/echo "Usage: /etc/init.d/skipes { start | stop }"
	;;
esac
