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

Annotation of /cauldron/ypserv/current/SOURCES/ypserv-ypserv.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: 2010 byte(s)
imported package ypserv
1 ennael 49052 #!/bin/sh
2     #
3     # ypserv: Starts the yp-server
4     #
5     # Version: @(#) /etc/init.d/ypserv.init 1.0
6     #
7     # Author: Joerg Mertin <smurphy@stargate.bln.sub.org>
8     #
9     # chkconfig: 2345 16 84
10     # description: ypserv is an implementation of the standard NIS/YP networking \
11     # protocol. It allows network-wide distribution of hostname, \
12     # username, and other information databases. This is the NIS \
13     # server, and is not needed on NIS clients.
14     # processname: ypserv
15     #
16     # config: /etc/ypserv.conf
17     #
18     ### BEGIN INIT INFO
19     # Provides: ypserv
20     # Required-Start: $remote_fs $portmap
21     # Required-Stop: $remote_fs $portmap
22     # Should-Start: slpd
23     # Should-Stop: slpd
24     # Default-Start: 2 3 4 5
25     # Short-Description: The ypserver daemon (for a NIS/YP server)
26     # Description: ypserv is an implementation of the standard NIS/YP networking
27     # protocol. It allows network-wide distribution of hostname,
28     # username, and other information databases. This is the NIS
29     # server, and is not needed on NIS clients.
30     ### END INIT INFO
31    
32     # Source function library.
33     if [ -f /etc/init.d/functions ] ; then
34     . /etc/init.d/functions
35     elif [ -f /etc/rc.d/init.d/functions ] ; then
36     . /etc/rc.d/init.d/functions
37     else
38     exit 0
39     fi
40    
41     # getting the YP-Domainname
42     . /etc/sysconfig/network
43    
44     RETVAL=0
45    
46     start() {
47     echo -n "Starting YP server services: "
48     daemon ypserv
49     RETVAL=$?
50     echo
51     [ $RETVAL -eq 0 ] && touch /var/lock/subsys/ypserv
52     return $RETVAL
53     }
54    
55     stop() {
56     echo -n "Stopping YP server services: "
57     killproc ypserv
58     RETVAL=$?
59     [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/ypserv
60     echo
61     return $RETVAL
62     }
63    
64     # See how we were called.
65     case "$1" in
66     start)
67     start
68     ;;
69     stop)
70     stop
71     ;;
72     status)
73     status ypserv
74     ;;
75     restart|reload)
76     stop
77     start
78     ;;
79     condrestart)
80     if [ -f /var/lock/subsys/ypserv ]; then
81     stop
82     start
83     fi
84     ;;
85     *)
86     echo "Usage: $0 {start|stop|status|reload|restart|condrestart}"
87     exit 1
88     esac
89    
90     exit $RETVAL
91    

  ViewVC Help
Powered by ViewVC 1.1.28