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 [ -x /sbin/pidof ] && [ "$1" != "stop" ] && [ -z "`/sbin/pidof portmap`" ]; then
33 echo "Error: portmap isn't running"
38 # Check if the service is already running?
39 if [ ! -f /var/lock/subsys/rquotad ]; then
40 # RQUOTADOPTIONS will be removed in the future
41 OPTIONS="$RQUOTADOPTIONS"
42 [ -n "$RQUOTAD_PORT" ] && OPTIONS="$OPTIONS -p $RQUOTAD_PORT"
43 is_yes "$AUTOFS" && OPTIONS="$OPTIONS --autofs"
44 if is_yes "$REMOTE_QUOTA_SETTING"; then
45 OPTIONS="$OPTIONS --setquota"
47 OPTIONS="$OPTIONS --no-setquota"
50 msg_starting "RPC rquotad"
51 daemon rpc.rquotad $OPTIONS
53 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/rquotad
55 msg_already_running "RPC rquotad"
60 if [ -f /var/lock/subsys/rquotad ]; then
62 msg_stopping "RPC rquotad"
64 rm -f /var/lock/subsys/rquotad
66 msg_not_running "RPC rquotad"
71 # See how we were called.
88 if [ ! -f /var/lock/subsys/quotad ]; then
91 /sbin/pidof rpc.rquotad >/dev/null 2>&1
97 msg_usage "$0 {start|stop|restart|force-reload|probe|status}"