Skip to content
Snippets Groups Projects
nfs 685 B
Newer Older
  • Learn to ignore specific revisions
  • #!/bin/bash
    
    # Keep the following services in proper shutdown order
    # (Check with the start/stop numbers in the init file)
    #
    # NOTE: This seems to work. Moving netfs at the end does not work.
    #       If you modify this, test-test-test...
    SERVICES="rpcidmapd rpcgssd nfslock rpcbind"
    
    stop() {
    	echo "STOPPING NFS"
    	if [ ${ESAME_NFS} -eq 0 ]; then
    		sync
    		umount /home
    		for i in ${SERVICES}; do
    			service "$i" stop
    		done
    	fi
    }
    
    start() {
    	echo "STARTING NFS"
    	for i in ${SERVICES}; do
    		service "$i" start
    	done
    	mount /home
    }
    
    case "$1" in
    'start')
    	start
    	;;
    'stop')
    	stop
    	;;
    'restart')
    	stop
    	start
    	;;
    *)
    	echo "Usage: $0 { start | stop | restart }";
    	exit 1;
    	;;
    esac
    
    exit 0