mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
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.
This commit is contained in:
parent
620c756443
commit
b3c083b985
1 changed files with 14 additions and 4 deletions
|
@ -274,9 +274,19 @@ (define (nfs-shepherd-services config)
|
||||||
rpcmountd-port rpcstatd-port nfsd-port nfsd-threads
|
rpcmountd-port rpcstatd-port nfsd-port nfsd-threads
|
||||||
pipefs-directory debug)
|
pipefs-directory debug)
|
||||||
(list (shepherd-service
|
(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.")
|
(documentation "Run the NFS statd daemon.")
|
||||||
(provision '(rpc.statd))
|
(provision '(rpc.statd))
|
||||||
(requirement '(rpcbind-daemon))
|
(requirement '(/proc/fs/nfsd rpcbind-daemon))
|
||||||
(start
|
(start
|
||||||
#~(make-forkexec-constructor
|
#~(make-forkexec-constructor
|
||||||
(list #$(file-append nfs-utils "/sbin/rpc.statd")
|
(list #$(file-append nfs-utils "/sbin/rpc.statd")
|
||||||
|
@ -295,7 +305,7 @@ (define (nfs-shepherd-services config)
|
||||||
(shepherd-service
|
(shepherd-service
|
||||||
(documentation "Run the NFS mountd daemon.")
|
(documentation "Run the NFS mountd daemon.")
|
||||||
(provision '(rpc.mountd))
|
(provision '(rpc.mountd))
|
||||||
(requirement '(rpc.statd))
|
(requirement '(/proc/fs/nfsd rpc.statd))
|
||||||
(start
|
(start
|
||||||
#~(make-forkexec-constructor
|
#~(make-forkexec-constructor
|
||||||
(list #$(file-append nfs-utils "/sbin/rpc.mountd")
|
(list #$(file-append nfs-utils "/sbin/rpc.mountd")
|
||||||
|
@ -310,7 +320,7 @@ (define (nfs-shepherd-services config)
|
||||||
(shepherd-service
|
(shepherd-service
|
||||||
(documentation "Run the NFS daemon.")
|
(documentation "Run the NFS daemon.")
|
||||||
(provision '(rpc.nfsd))
|
(provision '(rpc.nfsd))
|
||||||
(requirement '(rpc.statd networking))
|
(requirement '(/proc/fs/nfsd rpc.statd networking))
|
||||||
(start
|
(start
|
||||||
#~(lambda _
|
#~(lambda _
|
||||||
(zero? (system* #$(file-append nfs-utils "/sbin/rpc.nfsd")
|
(zero? (system* #$(file-append nfs-utils "/sbin/rpc.nfsd")
|
||||||
|
@ -329,7 +339,7 @@ (define (nfs-shepherd-services config)
|
||||||
(shepherd-service
|
(shepherd-service
|
||||||
(documentation "Run the NFS mountd daemon and refresh exports.")
|
(documentation "Run the NFS mountd daemon and refresh exports.")
|
||||||
(provision '(nfs))
|
(provision '(nfs))
|
||||||
(requirement '(rpc.nfsd rpc.mountd rpc.statd rpcbind-daemon))
|
(requirement '(/proc/fs/nfsd rpc.nfsd rpc.mountd rpc.statd rpcbind-daemon))
|
||||||
(start
|
(start
|
||||||
#~(lambda _
|
#~(lambda _
|
||||||
(let ((rpcdebug #$(file-append nfs-utils "/sbin/rpcdebug")))
|
(let ((rpcdebug #$(file-append nfs-utils "/sbin/rpcdebug")))
|
||||||
|
|
Loading…
Reference in a new issue