stop() {
# Stop daemons.
printf "Shutting down NFS mountd: "
- killall -q rpc.mountd
+ killall -q rpc.mountd 2>/dev/null
[ $? = 0 ] && echo "OK" || echo "FAIL"
printf "Shutting down NFS daemon: "
- kill -9 `pidof nfsd` 2>/dev/null
+ killall -q nfsd 2>/dev/null
[ $? = 0 ] && echo "OK" || echo "FAIL"
printf "Shutting down NFS services: "
/usr/sbin/exportfs -au
- rm -f /var/lock/subsys/nfs
- killall -q rpc.statd
[ $? = 0 ] && echo "OK" || echo "FAIL"
printf "Stopping NFS statd: "
- killall -q rpc.statd
+ killall -q rpc.statd 2>/dev/null
[ $? = 0 ] && echo "OK" || echo "FAIL"
+ rm -f /var/lock/subsys/nfs
+ rm -f /var/run/rpc.statd.pid
rm -f /var/lock/subsys/nfslock
}
touch /var/lock/subsys/nfs
;;
*)
- echo "Usage: nfs {start|stop|reload}"
+ echo "Usage: $0 {start|stop|restart|reload}"
exit 1
esac