]> git.pld-linux.org Git - packages/clusternfs.git/blame - clusternfs.init
- PLDized
[packages/clusternfs.git] / clusternfs.init
CommitLineData
c2f75cea
TO
1#!/bin/bash
2# init file for ClusterNFS
3#
4# chkconfig: 345 50 50
5# description: ClusterNFS server
6#
7# processname: /usr/sbin/rpc.mountd
8# processname: /usr/sbin/rpc.nfsd
9# config: /etc/exports
10
11# source function library
12. /etc/rc.d/init.d/functions
13
14OPTIONS_NFSD="-T"
15OPTIONS_MNTD="-T"
16RETVAL=0
17prog_nfsd="rpc.nfsd"
18prog_mntd="rpc.mountd"
19
20start() {
21 msg_starting "ClusterNFS ($prog_mntd)"
22 daemon /usr/sbin/rpc.mountd $OPTIONS_MNTD
23 RETVAL=$?
24 msg_starting "ClusterNFS ($prog_nfsd)"
25 daemon /usr/sbin/rpc.nfsd $OPTIONS_NFSD
26 RETVAL=$?
27 touch /var/lock/subsys/clusternfs
28 return $RETVAL
29}
30
31stop() {
32 msg_stopping "ClusterNFS ($prog_nfsd)"
33 killproc /usr/sbin/rpc.nfsd
34 RETVAL=$?
35 msg_stopping "ClusterNFS ($prog_mntd)"
36 killproc /usr/sbin/rpc.mountd
37 RETVAL=$?
38 rm -f /var/lock/subsys/clusternfs
39 return $RETVAL
40}
41
42reload(){
43 stop
44 start
45}
46
47restart(){
48 stop
49 start
50}
51
52condrestart(){
53 [ -e /var/lock/subsys/clusternfs ] && restart
54 return 0
55}
56
57case "$1" in
58 start)
59 start
60 ;;
61 stop)
62 stop
63 ;;
64 restart)
65 restart
66 ;;
67 reload)
68 reload
69 ;;
70 condrestart)
71 condrestart
72 ;;
73 status)
74 status rpc.nfsd
75 status rpc.mountd
76 RETVAL=$?
77 ;;
78 *)
79 gprintf "Usage: $0 {start|stop|status|restart|condrestart|reload}"
80 RETVAL=1
81esac
82
83exit $RETVAL
This page took 0.058241 seconds and 4 git commands to generate.