florian 9ae7e8f1a5 Add nfs-kernel-server package. Closes #500
git-svn-id: svn://svn.openwrt.org/openwrt/packages@4129 3c298f89-4303-0410-b956-a3cf2f4a3e73
2006-07-11 19:13:10 +00:00

48 lines
581 B
Bash

#!/bin/sh
NFS_D=/var/lib/nfs
_start() {
mkdir -p $NFS_D
touch $NFS_D/rmtab
/usr/sbin/rpc.statd
/usr/sbin/rpc.lockd
/usr/sbin/exportfs -r
/usr/sbin/rpc.nfsd
/usr/sbin/rpc.mountd
}
_stop() {
killall rpc.mountd 2> /dev/null
killall -9 nfsd 2> /dev/null
/usr/sbin/exportfs -au
killall lockd 2> /dev/null
killall rpc.statd 2> /dev/null
}
_reload() {
/usr/sbin/exportfs -r
}
case $1 in
start)
_start
;;
stop)
_stop
;;
reload)
_reload
;;
restart)
_stop
sleep 1
_start
;;
*)
echo "usage: $0 (start|stop|reload|restart)"
exit 1
esac
exit $?