From f8dbbac1d814b03cc4906be4ed8ede361ead4965 Mon Sep 17 00:00:00 2001 From: tripolar Date: Wed, 9 Nov 2011 16:11:05 +0000 Subject: [PATCH] [packages] nfs-kernel-server: use new service wrapper git-svn-id: svn://svn.openwrt.org/openwrt/packages@28880 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- net/nfs-kernel-server/files/nfsd.init | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/net/nfs-kernel-server/files/nfsd.init b/net/nfs-kernel-server/files/nfsd.init index 1a04d696e..b2bb51db1 100644 --- a/net/nfs-kernel-server/files/nfsd.init +++ b/net/nfs-kernel-server/files/nfsd.init @@ -4,6 +4,9 @@ START=60 STOP=60 +SERVICE_DAEMONIZE=1 +SERVICE_WRITE_PID=1 + NFS_D=/var/lib/nfs LOCK_D=/var/lib/nfs/sm @@ -15,17 +18,17 @@ start() { touch $NFS_D/rmtab sysctl -w fs.nfs.nlm_tcpport=32777 fs.nfs.nlm_udpport=32777 > /dev/null - /usr/sbin/rpc.statd -p 32778 -o 32779 + service_start /usr/sbin/rpc.statd -p 32778 -o 32779 /usr/sbin/exportfs -r /usr/sbin/rpc.nfsd - /usr/sbin/rpc.mountd -p 32780 + service_start /usr/sbin/rpc.mountd -p 32780 -F } stop() { - killall rpc.mountd 2> /dev/null + service_stop /usr/sbin/rpc.mountd rpc.nfsd 0 2> /dev/null /usr/sbin/exportfs -au - killall rpc.statd 2> /dev/null + service_stop /usr/sbin/rpc.statd grep -q /proc/fs/nfsd /proc/mounts && \ umount /proc/fs/nfsd }