#! /bin/sh
#	Copyright (c) 1991, Silicon Graphics, Inc.
#ident	"$Revision: 1.5 $"

/etc/chkconfig rfindd || exit

if /etc/chkconfig verbose	# For a verbose startup and shutdown
then
    ECHO=echo
else				# For a quiet startup and shutdown
    ECHO=:
fi

# only run if prior run state (9th field of who -r) is 'S'
[ x"`(set -- \`who -r\`; echo $9) 2>/dev/null`" = xS ] || exit

case $1 in
    'start')
	$ECHO "Starting rfind daemon"
	cd /var/rfindd
	PATH=. /bin/su rfindd -c rfindd
	;;
    'stop')
	$ECHO "Stopping rfind daemon"
	/etc/killall rfindd
	;;
esac
