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

Annotation of /cauldron/ypserv/current/SOURCES/ypserv-yppasswdd.init

Parent Directory Parent Directory | Revision Log Revision Log


Revision 49052 - (hide annotations) (download)
Tue Feb 8 16:37:55 2011 UTC (12 years, 3 months ago) by ennael
File size: 1917 byte(s)
imported package ypserv
1 ennael 49052 #!/bin/sh
2     #
3     # yppasswdd: Starts the yp-passwdd, the YP password changing server
4     #
5     # Version: @(#) /etc/init.d/yppasswdd 1.0
6     #
7     # chkconfig: 2345 66 34
8     # description: yppasswdd is the RPC server that lets users change their \
9     # passwords in the presence of NIS (a.k.a. YP). It must be \
10     # run on the NIS master server for that NIS domain. The client \
11     # program is knwon as yppasswd in most cases.
12     # processname: rpc.yppasswdd
13     #
14     ### BEGIN INIT INFO
15     # Provides: yppasswdd
16     # Required-Start: $portmap ypserv
17     # Required-Stop: $portmap
18     # Default-Start: 2 3 4 5
19     # Short-Description: The YP password changing server
20     # Description: yppasswdd is the RPC server that lets users change their
21     # passwords in the presence of NIS (a.k.a. YP). It must be
22     # run on the NIS master server for that NIS domain. The client
23     # program is knwon as yppasswd in most cases.
24     ### END INIT INFO
25    
26     # Source function library.
27     if [ -f /etc/init.d/functions ] ; then
28     . /etc/init.d/functions
29     elif [ -f /etc/rc.d/init.d/functions ] ; then
30     . /etc/rc.d/init.d/functions
31     else
32     exit 0
33     fi
34    
35     # getting the YP-Domainname
36     . /etc/sysconfig/network
37    
38     RETVAL=0
39    
40     start() {
41     echo -n "Starting YP passwd service: "
42     daemon rpc.yppasswdd
43     RETVAL=$?
44     echo
45     [ $RETVAL -eq 0 ] && touch /var/lock/subsys/yppasswdd
46     return $RETVAL
47     }
48    
49     stop() {
50     echo -n "Stopping YP passwd service: "
51     killproc rpc.yppasswdd
52     RETVAL=$?
53     [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/yppasswdd
54     echo
55     return $RETVAL
56     }
57    
58     # See how we were called.
59     case "$1" in
60     start)
61     start
62     ;;
63     stop)
64     stop
65     ;;
66     status)
67     status rpc.yppasswdd
68     ;;
69     restart|reload)
70     stop
71     start
72     ;;
73     condrestart)
74     if [ -f /var/lock/subsys/yppasswdd ]; then
75     stop
76     start
77     fi
78     ;;
79     *)
80     echo "Usage: $0 {start|stop|status|restart|reload|condrestart}"
81     exit 1
82     esac
83    
84     exit $RETVAL
85    

  ViewVC Help
Powered by ViewVC 1.1.28