963210
#!/bin/bash
963210
#
963210
# kpropd.init  Start and stop the Kerberos 5 propagation client.
963210
#
963210
# chkconfig:   - 35 65
963210
# description: Kerberos 5 is a trusted third-party authentication system.  \
963210
#	       This script starts and stops the service that allows this \
963210
#              KDC to receive updates from your master KDC.
963210
# processname: kpropd
963210
#
963210
963210
### BEGIN INIT INFO
963210
# Provides: kprop
963210
# Required-Start: $local_fs $network
963210
# Required-Stop: $local_fs $network
963210
# Should-Start: portreserve
963210
# Default-Start:
963210
# Default-Stop: 0 1 2 3 4 5 6
963210
# Short-Description: start and stop the Kerberos 5 propagation client
963210
# Description: The kpropd service accepts database updates pushed to it from \
963210
#              the master KDC.  It will never be needed on a master KDC.
963210
### END INIT INFO
963210
963210
# Get config.
963210
. /etc/sysconfig/network
963210
963210
# Source function library.
963210
. /etc/init.d/functions
963210
963210
RETVAL=0
963210
prog="Kerberos 5 Propagation Server"
963210
kpropd=/usr/sbin/kpropd
963210
963210
# Shell functions to cut down on useless shell instances.
963210
start() {
963210
  	[ -f /var/kerberos/krb5kdc/kpropd.acl ] || exit 6
963210
	[ -x $kpropd ] || exit 5
963210
	echo -n $"Starting $prog: "
963210
	# tell portreserve to release the krb5_prop port
963210
	[ -x /sbin/portrelease ] && /sbin/portrelease krb5_prop &>/dev/null || :
963210
	daemon ${kpropd} -S
963210
	RETVAL=$?
963210
	echo
963210
	if test $RETVAL -ne 0 ; then
963210
	    if status -l kprop ${kpropd} > /dev/null ; then
963210
		RETVAL=0
963210
	    fi
963210
	fi
963210
	[ $RETVAL = 0 ] && touch /var/lock/subsys/kprop
963210
}
963210
stop() {
963210
	echo -n $"Stopping $prog: "
963210
	killproc ${kpropd}
963210
	RETVAL=$?
963210
	echo
963210
	[ $RETVAL = 0 ] && rm -f /var/lock/subsys/kprop
963210
}
963210
963210
# See how we were called.
963210
case "$1" in
963210
  start)
963210
	start
963210
	;;
963210
  stop)
963210
	stop
963210
	;;
963210
  # We don't really "do" reload, so treat it as a restart.
963210
  restart|force-reload)
963210
	stop
963210
	start
963210
	;;
963210
  reload)
963210
	echo "can't reload configuration, you have to restart it"
963210
	RETVAL=3
963210
	;;
963210
  status)
963210
	status -l kprop ${kpropd}
963210
	RETVAL=$?
963210
	;;
963210
  condrestart)
963210
	if [ -f /var/lock/subsys/kprop ] ; then
963210
		stop
963210
		start
963210
	fi
963210
	;;
963210
  *)
963210
	echo $"Usage: $0 {start|stop|restart|condrestart|reload|status|force-reload}"
963210
	RETVAL=2
963210
	;;
963210
esac
963210
963210
exit $RETVAL