3 # rquotad This shell script takes care of starting and stopping
4 # the RPC rquotad service.
7 # description: rquotad is an RPC server which returns quotas for \
8 # a user of a local filesystem which is mounted by \
9 # a remote machine over the NFS. It also allows \
10 # setting of quotas on NFS mounted filesystem
13 # Source function library.
14 . /etc/rc.d/init.d/functions
17 . /etc/sysconfig/network
20 [ -f /etc/sysconfig/rquotad ] && . /etc/sysconfig/rquotad
22 # Check that networking is up.
23 if is_yes "${NETWORKING}"; then
24 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
25 msg_network_down "RPC rquotad"
32 if [ "$1" != "stop" ]; then
33 check_portmapper || { nls "Error: portmap isn't running" && exit 0; }
37 # Check if the service is already running?
38 if [ ! -f /var/lock/subsys/rquotad ]; then
39 # RQUOTADOPTIONS will be removed in the future
40 OPTIONS="$RQUOTADOPTIONS"
41 [ -n "$RQUOTAD_PORT" ] && OPTIONS="$OPTIONS -p $RQUOTAD_PORT"
42 is_yes "$AUTOFS" && OPTIONS="$OPTIONS --autofs"
43 if is_yes "$REMOTE_QUOTA_SETTING"; then
44 OPTIONS="$OPTIONS --setquota"
46 OPTIONS="$OPTIONS --no-setquota"
49 msg_starting "RPC rquotad"
50 daemon rpc.rquotad $OPTIONS
52 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/rquotad
54 msg_already_running "RPC rquotad"
59 if [ -f /var/lock/subsys/rquotad ]; then
61 msg_stopping "RPC rquotad"
63 rm -f /var/lock/subsys/rquotad
65 msg_not_running "RPC rquotad"
70 # See how we were called.
87 if [ ! -f /var/lock/subsys/quotad ]; then
90 /sbin/pidof rpc.rquotad >/dev/null 2>&1
96 msg_usage "$0 {start|stop|restart|force-reload|probe|status}"