#!/bin/sh
# 
#


case "$1" in
start)

	if [ -x /usr/local/sbin/rpc.statd ]; then
		start-stop-daemon --start --exec /usr/local/sbin/portmap
		/usr/local/sbin/sm-notify -q
		start-stop-daemon --start --exec /usr/local/sbin/rpc.statd
		mount -a -t nfs
		echo "Starting nfs client utilities."
	else
		echo "rpc.statd is missing.  You need to install nfs-utils."
	fi

;;

stop)
	umount -a -t nfs
	start-stop-daemon --stop --exec /usr/local/sbin/rpc.statd
;;

restart)
  	$0 stop
  	$0 start
;;

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

