a096ea9cdc
Signed-off-by: Peter Wagner <tripolar@gmx.at> git-svn-id: svn://svn.openwrt.org/openwrt/packages@38207 3c298f89-4303-0410-b956-a3cf2f4a3e73
39 lines
754 B
Bash
39 lines
754 B
Bash
#!/bin/sh /etc/rc.common
|
|
# Copyright (C) 2006 OpenWrt.org
|
|
|
|
START=60
|
|
STOP=60
|
|
|
|
USE_PROCD=1
|
|
|
|
NFS_D=/var/lib/nfs
|
|
LOCK_D=/var/lib/nfs/sm
|
|
|
|
start_service() {
|
|
grep -q /proc/fs/nfsd /proc/mounts || \
|
|
mount -t nfsd nfsd /proc/fs/nfsd
|
|
mkdir -p $NFS_D
|
|
mkdir -p $LOCK_D
|
|
touch $NFS_D/rmtab
|
|
|
|
sysctl -w fs.nfs.nlm_tcpport=32777 fs.nfs.nlm_udpport=32777 > /dev/null
|
|
|
|
procd_open_instance
|
|
procd_set_param command /usr/sbin/rpc.statd -p 32778 -o 32779 -F
|
|
procd_close_instance
|
|
|
|
/usr/sbin/exportfs -r
|
|
/usr/sbin/rpc.nfsd
|
|
|
|
procd_open_instance
|
|
procd_set_param command /usr/sbin/rpc.mountd -p 32780 -F
|
|
procd_close_instance
|
|
}
|
|
|
|
stop_service() {
|
|
rpc.nfsd 0 2> /dev/null
|
|
/usr/sbin/exportfs -au
|
|
grep -q /proc/fs/nfsd /proc/mounts && \
|
|
umount /proc/fs/nfsd
|
|
}
|