#!/bin/sh
########################################################################
# Begin nfs-client
#
# Description : Start statd
#
# Authors     : Ken Moffat - ken@linuxfromscratch.org
#               Bruce Dubbs - bdubbs@linuxfromscratch.org
#               Douglas R. Reno - renodr@linuxfromscratch.org
#
# Version     : LFS 7.0
#
########################################################################

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

. /lib/lsb/init-functions

#$LastChangedBy: renodr $
#$Date: 2017-06-11 19:29:36 -0500 (Sun, 11 Jun 2017) $

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
      ;;

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

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