#!/bin/sh
# Begin /etc/init.d/nfs

source /etc/init.d/functions

case "$1" in
        start)
                echo -n "Starting RPC Portmapper"
                loadproc /sbin/portmap
                echo -n "Starting NFS"
                loadproc /usr/sbin/rpc.mountd
                loadproc /usr/sbin/rpc.nfsd 8
                loadproc /usr/sbin/rpc.statd
                ;;

        stop)
                echo -n "Stopping NFS"
                killproc /usr/sbin/rpc.nfsd
                killproc /usr/sbin/rpc.mountd

                echo -n "Stopping Portmapper"
                killproc /sbin/portmap
                ;;

        reload)
                echo "Reloading NFS"
                /usr/sbin/exportfs -ra
                ;;

        restart)
                $0 stop
                /usr/bin/sleep 1
                $0 start
                ;;

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

esac


