nfs-kernel-server switch to new procd init script style
authorPeter Wagner <​tripolar@gmx.at>
Thu, 26 Sep 2013 12:08:31 +0000 (12:08 +0000)
committerPeter Wagner <​tripolar@gmx.at>
Thu, 26 Sep 2013 12:08:31 +0000 (12:08 +0000)
Signed-off-by: Peter Wagner <tripolar@gmx.at>
SVN-Revision: 38207

net/nfs-kernel-server/files/nfsd.init

index 2531d591f84ce02c5ef88f4f13bf77b1311b7e96..42b9a2aa49fdb8734178b44c7006b4f887dfd5ed 100644 (file)
@@ -4,12 +4,12 @@
 START=60
 STOP=60
 
-SERVICE_USE_PID=1
+USE_PROCD=1
 
 NFS_D=/var/lib/nfs
 LOCK_D=/var/lib/nfs/sm
 
-start() {
+start_service() {
        grep -q /proc/fs/nfsd /proc/mounts || \
                mount -t nfsd nfsd /proc/fs/nfsd
        mkdir -p $NFS_D
@@ -17,24 +17,22 @@ start() {
        touch $NFS_D/rmtab
 
         sysctl -w fs.nfs.nlm_tcpport=32777 fs.nfs.nlm_udpport=32777 > /dev/null
-       service_start /usr/sbin/rpc.statd -p 32778 -o 32779
+
+       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
-       SERVICE_WRITE_PID=1 \
-       SERVICE_DAEMONIZE=1 \
-       service_start /usr/sbin/rpc.mountd -p 32780 -F
+
+       procd_open_instance
+       procd_set_param command /usr/sbin/rpc.mountd -p 32780 -F
+       procd_close_instance
 }
 
-stop() {
-       service_stop /usr/sbin/rpc.mountd
+stop_service() {
        rpc.nfsd 0 2> /dev/null
        /usr/sbin/exportfs -au
-       service_stop /usr/sbin/rpc.statd
        grep -q /proc/fs/nfsd /proc/mounts && \
                umount /proc/fs/nfsd
 }
-
-reload() {
-       /usr/sbin/exportfs -r
-}
-