guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/02: services/nfs: Mount nfsd pseudo file system.


From: guix-commits
Subject: 01/02: services/nfs: Mount nfsd pseudo file system.
Date: Wed, 25 Mar 2020 09:17:31 -0400 (EDT)

rekado pushed a commit to branch master
in repository guix.

commit b3c083b98530448fe226399c037c0126a531b459
Author: Ricardo Wurmus <address@hidden>
AuthorDate: Wed Mar 25 14:10:55 2020 +0100

    services/nfs: Mount nfsd pseudo file system.
    
    * gnu/services/nfs.scm (nfs-shepherd-services): Add shepherd-service 
providing
    /proc/fs/nfsd and make other shepherd services require it.
---
 gnu/services/nfs.scm | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/gnu/services/nfs.scm b/gnu/services/nfs.scm
index c909843..cbaa97b 100644
--- a/gnu/services/nfs.scm
+++ b/gnu/services/nfs.scm
@@ -274,9 +274,19 @@
                rpcmountd-port rpcstatd-port nfsd-port nfsd-threads
                pipefs-directory debug)
     (list (shepherd-service
+           (documentation "Mount the nfsd pseudo file system.")
+           (provision '(/proc/fs/nfsd))
+           (start #~(lambda ()
+                      (mount "nfsd" "/proc/fs/nfsd" "nfsd")
+                      (member "/proc/fs/nfsd" (mount-points))))
+
+           (stop #~(lambda (pid . args)
+                     (umount "/proc/fs/nfsd" MNT_DETACH)
+                     (not (member "/proc/fs/nfsd" (mount-points))))))
+          (shepherd-service
            (documentation "Run the NFS statd daemon.")
            (provision '(rpc.statd))
-           (requirement '(rpcbind-daemon))
+           (requirement '(/proc/fs/nfsd rpcbind-daemon))
            (start
             #~(make-forkexec-constructor
                (list #$(file-append nfs-utils "/sbin/rpc.statd")
@@ -295,7 +305,7 @@
           (shepherd-service
            (documentation "Run the NFS mountd daemon.")
            (provision '(rpc.mountd))
-           (requirement '(rpc.statd))
+           (requirement '(/proc/fs/nfsd rpc.statd))
            (start
             #~(make-forkexec-constructor
                (list #$(file-append nfs-utils "/sbin/rpc.mountd")
@@ -310,7 +320,7 @@
           (shepherd-service
            (documentation "Run the NFS daemon.")
            (provision '(rpc.nfsd))
-           (requirement '(rpc.statd networking))
+           (requirement '(/proc/fs/nfsd rpc.statd networking))
            (start
             #~(lambda _
                 (zero? (system* #$(file-append nfs-utils "/sbin/rpc.nfsd")
@@ -329,7 +339,7 @@
           (shepherd-service
            (documentation "Run the NFS mountd daemon and refresh exports.")
            (provision '(nfs))
-           (requirement '(rpc.nfsd rpc.mountd rpc.statd rpcbind-daemon))
+           (requirement '(/proc/fs/nfsd rpc.nfsd rpc.mountd rpc.statd 
rpcbind-daemon))
            (start
             #~(lambda _
                 (let ((rpcdebug #$(file-append nfs-utils "/sbin/rpcdebug")))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]