#!/bin/sh
########################################################################
# Begin nfs-client
#
# Description : Start nfs-client daemon
#
#
########################################################################

### BEGIN INIT INFO
# Provides:          $nfs-client
# Required-Start:    $wicd $rpcbind
# Should-Start:	     $ripd $ripngd
# Required-Stop:     $rpcbind
# Should-Stop:	     $rpcbind
# Default-Start:     3 4 5
# Default-Stop:      0 1 2 6
# Short-Description: Starts nf-utils daemon
# Description:       rpc.statd provides file locking on nfs.
# X-LFS-Provided-By: BLFS / LFS 7.0
### END INIT INFO

. /lib/lsb/init-functions

case "$1" in
   start)
      log_info_msg "Starting NFS statd..."
      start_daemon /sbin/rpc.statd --no-notify
      evaluate_retval
      ;;

   stop)
      log_info_msg "Stopping NFS statd..."
      killproc /sbin/rpc.statd
      evaluate_retval
      ;;

   restart)
      $0 stop
      sleep 1
      $0 start
      ;;

   status)
      statusproc /sbin/rpc.statd
      ;;

   condrestart)
      pid=`cat $PID_FILE 2>/dev/null`
      if [ -n "${pid}"  -a -d /proc/$pid ]; then
        $0 restart
        fi
      ;;

   *)
      echo "Usage: $0 {start|stop|restart|status}"
      exit 1
      ;;
esac

# End /etc/init.d/nfs-client
