3 # rquotad This shell script takes care of starting and stopping
4 # the NFS quota service.
7 # description: NFS is a popular protocol for file sharing across \
8 # TCP/IP networks. This service provides NFS file \
9 # locking functionality.
12 # Source function library.
13 . /etc/rc.d/init.d/functions
16 . /etc/sysconfig/network
19 [ -f /etc/sysconfig/rquotad ] && . /etc/sysconfig/rquotad
21 # Check that networking is up.
22 if is_yes "${NETWORKING}"; then
23 if [ ! -f /var/lock/subsys/network -a "$1" != stop -a "$1" != status ]; then
24 msg_network_down "NFS rquotad"
31 if [ -x /sbin/pidof ] && [ "$1" != "stop" ]; then
32 [ -z "`/sbin/pidof portmap`" ] && echo "Error: portmap isn't running" && exit 0
36 [ -x /usr/sbin/rpc.rquotad ] || exit 0
39 # See how we were called.
42 # Check if the service is already running?
43 if [ ! -f /var/lock/subsys/rquotad ]; then
45 msg_starting "NFS quotas"
48 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/rquotad
50 msg_already_running "NFS quota daemon"
54 if [ -f /var/lock/subsys/rquotad ]; then
56 msg_stopping "NFS quotas"
58 rm -f /var/lock/subsys/rquotad
60 msg_not_running "NFS quota daemon"
73 if [ ! -f /var/lock/subsys/quotad ]; then
76 /sbin/pidof rpc.rquotad >/dev/null 2>&1;
82 msg_usage "$0 {start|stop|restart|force-reload|probe|status}"