Sophie

Sophie

distrib > Mandriva > 10.2 > x86_64 > by-pkgid > 7ce96ef8812642cacf5f3f6b5daea15d > files > 10

rusers-0.17-12mdk.src.rpm

#! /bin/sh
#
# chkconfig: 345 60 20
# description: The rusers protocol allows users on a network to identify \
#              who is logged in on other responding machines.
# processname: rpc.rusersd

# Source function library.
. /etc/rc.d/init.d/functions

# Get config.
. /etc/sysconfig/network

# Check that networking is up.
if [ ${NETWORKING} = "no" ]
then
	exit 0
fi

RETVAL=0

# See how we were called.
case "$1" in
  start)
	status portmap > /dev/null
	RETVAL=$?
	[ $RETVAL -ne 0 ] && /etc/rc.d/init.d/portmap start
	echo -n "Starting rusers services: "
	daemon rpc.rusersd
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/rusersd
	;;
  stop)
	echo -n "Stopping rusers services: "
	killproc rpc.rusersd
	RETVAL=$?
	echo
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/rusersd
	;;
  status)
	status rpc.rusersd
	RETVAL=$?
	;;
  restart|reload)
	$0 stop
	$0 start
	RETVAL=$?
	;;
  *)
	echo "Usage: $0 {start|stop|status|restart}"
	exit 1
esac

exit $RETVAL