9ae7e8f1a5
git-svn-id: svn://svn.openwrt.org/openwrt/packages@4129 3c298f89-4303-0410-b956-a3cf2f4a3e73
48 lines
581 B
Bash
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 $?
|