085110d03e
Tue Jul 24 2001 Florian La Roche <Florian.LaRoche@redhat.de> - add gdbm-devel BuildReq #49767 - add ypxfrd init script #44845 - fix #44805 - fix #20042, adding option to yppasswdd startup - own /var/yp
66 lines
1.1 KiB
Bash
66 lines
1.1 KiB
Bash
#!/bin/bash
|
|
#
|
|
# ypxfrd: Starts the ypxfrd daemon
|
|
#
|
|
# Version: @(#) /etc/init.d/ypxfrd 1.0
|
|
#
|
|
# chkconfig: - 26 74
|
|
# description: ypxfrd should be started in addition to ypserv to accelerate \
|
|
# transferring yp maps.
|
|
# processname: ypxfrd
|
|
|
|
# Source function library.
|
|
[ -f /etc/rc.d/init.d/functions ] || exit 0
|
|
. /etc/rc.d/init.d/functions
|
|
|
|
# getting the YP-Domainname
|
|
. /etc/sysconfig/network
|
|
|
|
RETVAL=0
|
|
|
|
start() {
|
|
echo -n $"Starting YP map server: "
|
|
daemon ypxfrd $YPXFRD_ARGS
|
|
ETVAL=$?
|
|
echo
|
|
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/ypxfrd
|
|
return $RETVAL
|
|
}
|
|
|
|
stop() {
|
|
echo -n $"Stopping YP map server: "
|
|
killproc ypxfrd
|
|
RETVAL=$?
|
|
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/ypxfrd
|
|
echo
|
|
return $RETVAL
|
|
}
|
|
|
|
# See how we were called.
|
|
case "$1" in
|
|
start)
|
|
start
|
|
;;
|
|
stop)
|
|
stop
|
|
;;
|
|
status)
|
|
status ypxfrd
|
|
;;
|
|
restart|reload)
|
|
stop
|
|
start
|
|
;;
|
|
condrestart)
|
|
if [ -f /var/lock/subsys/ypxfrd ]; then
|
|
stop
|
|
start
|
|
fi
|
|
;;
|
|
*)
|
|
echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
|
|
exit 1
|
|
esac
|
|
|
|
exit $RETVAL
|