/[packages]/cauldron/ypserv/current/SOURCES/ypserv-ypxfrd.init
ViewVC logotype

Contents of /cauldron/ypserv/current/SOURCES/ypserv-ypxfrd.init

Parent Directory Parent Directory | Revision Log Revision Log


Revision 49052 - (show annotations) (download)
Tue Feb 8 16:37:55 2011 UTC (13 years, 8 months ago) by ennael
File size: 1455 byte(s)
imported package ypserv
1 #!/bin/bash
2 #
3 # ypxfrd: Starts the ypxfrd daemon
4 #
5 # Version: @(#) /etc/init.d/ypxfrd 1.0
6 #
7 # chkconfig: 2345 26 74
8 # description: ypxfrd should be started in addition to ypserv to accelerate \
9 # transferring yp maps.
10 # processname: ypxfrd
11 #
12 ### BEGIN INIT INFO
13 # Provides: ypxfrd
14 # Required-Start: $portmap ypserv
15 # Required-Stop: $portmap
16 # Default-Start: 2 3 4 5
17 # Short-Description: The ypxfrd daemon (for a NIS/YP server)
18 # Description: ypxfrd should be started in addition to ypserv to accelerate
19 # transferring yp maps.
20 ### END INIT INFO
21
22 # Source function library.
23 [ -f /etc/rc.d/init.d/functions ] || exit 0
24 . /etc/rc.d/init.d/functions
25
26 # getting the YP-Domainname
27 . /etc/sysconfig/network
28
29 RETVAL=0
30
31 start() {
32 echo -n $"Starting YP map server: "
33 daemon rpc.ypxfrd $YPXFRD_ARGS
34 RETVAL=$?
35 echo
36 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ypxfrd
37 return $RETVAL
38 }
39
40 stop() {
41 echo -n $"Stopping YP map server: "
42 killproc rpc.ypxfrd
43 RETVAL=$?
44 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/ypxfrd
45 echo
46 return $RETVAL
47 }
48
49 # See how we were called.
50 case "$1" in
51 start)
52 start
53 ;;
54 stop)
55 stop
56 ;;
57 status)
58 status rpc.ypxfrd
59 ;;
60 restart|reload)
61 stop
62 start
63 ;;
64 condrestart)
65 if [ -f /var/lock/subsys/ypxfrd ]; then
66 stop
67 start
68 fi
69 ;;
70 *)
71 echo $"Usage: $0 {start|stop|status|restart|reload|condrestart}"
72 exit 1
73 esac
74
75 exit $RETVAL

  ViewVC Help
Powered by ViewVC 1.1.30