Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-release > by-pkgid > 09fa0060c3c492271979419793dac8cc > files > 1

ypserv-2.32.1-6.mga6.x86_64.rpm

#!/bin/sh
#
# yppasswdd:    Starts the yp-passwdd, the YP password changing server
#
# Version:      @(#) /etc/init.d/yppasswdd 1.0
#
# chkconfig: 2345 66 34
# description:  yppasswdd is the RPC server that lets users change their \
#		passwords in the presence of NIS (a.k.a. YP). It must be \
#		run on the NIS master server for that NIS domain. The client \
#		program is knwon as yppasswd in most cases.
# processname: rpc.yppasswdd
#
### BEGIN INIT INFO
# Provides: yppasswdd
# Required-Start: $portmap ypserv
# Required-Stop: $portmap
# Default-Start: 2 3 4 5
# Default-Stop: 0 6
# Short-Description: The YP password changing server
# Description: yppasswdd is the RPC server that lets users change their
#              passwords in the presence of NIS (a.k.a. YP). It must be
#              run on the NIS master server for that NIS domain. The client
#              program is knwon as yppasswd in most cases.
### END INIT INFO

# Source function library.
if [ -f /etc/init.d/functions ] ; then
        . /etc/init.d/functions
elif [ -f /etc/rc.d/init.d/functions ] ; then
        . /etc/rc.d/init.d/functions
else
        exit 0
fi

# getting the YP-Domainname
. /etc/sysconfig/network

RETVAL=0

start() {
        gprintf "Starting YP passwd service: "
        daemon rpc.yppasswdd
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/yppasswdd
	return $RETVAL
}

stop() {
        gprintf "Stopping YP passwd service: "
        killproc rpc.yppasswdd
        RETVAL=$?
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/yppasswdd
        echo
	return $RETVAL
}

# See how we were called.
case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  status)
	status rpc.yppasswdd
	;;
  restart|reload)
	stop
	start
	;;
  condrestart)
	if [ -f /var/lock/subsys/yppasswdd ]; then
	    stop
	    start
	fi
	;;
  *)
	gprintf "Usage: %s {start|stop|status|restart|reload|condrestart}\n" "$0"
	exit 1
esac

exit $RETVAL