summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/guix.texi6
-rw-r--r--gnu/services/nfs.scm25
2 files changed, 16 insertions, 15 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index af87d760878..8cb85fe62c0 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -22233,9 +22233,9 @@ It has the following parameters:
22233@item @code{nfs-utils} (default: @code{nfs-utils}) 22233@item @code{nfs-utils} (default: @code{nfs-utils})
22234The nfs-utils package to use. 22234The nfs-utils package to use.
22235 22235
22236@item @code{nfs-version} (default: @code{#f}) 22236@item @code{nfs-versions} (default: @code{'("4.2" "4.1" "4.0")})
22237If a string value is provided, the @command{rpc.nfsd} daemon will be 22237If a list of string values is provided, the @command{rpc.nfsd} daemon
22238limited to supporting the given version of the NFS protocol. 22238will be limited to supporting the given versions of the NFS protocol.
22239 22239
22240@item @code{exports} (default: @code{'()}) 22240@item @code{exports} (default: @code{'()})
22241This is a list of directories the NFS server should export. Each entry 22241This is a list of directories the NFS server should export. Each entry
diff --git a/gnu/services/nfs.scm b/gnu/services/nfs.scm
index cbaa97b2fd3..4e358197e26 100644
--- a/gnu/services/nfs.scm
+++ b/gnu/services/nfs.scm
@@ -245,8 +245,8 @@
245 nfs-configuration? 245 nfs-configuration?
246 (nfs-utils nfs-configuration-nfs-utils 246 (nfs-utils nfs-configuration-nfs-utils
247 (default nfs-utils)) 247 (default nfs-utils))
248 (nfs-version nfs-configuration-nfs-version 248 (nfs-versions nfs-configuration-nfs-versions
249 (default #f)) ; string 249 (default '("4.2" "4.1" "4.0")))
250 (exports nfs-configuration-exports 250 (exports nfs-configuration-exports
251 (default '())) 251 (default '()))
252 (rpcmountd-port nfs-configuration-rpcmountd-port 252 (rpcmountd-port nfs-configuration-rpcmountd-port
@@ -270,7 +270,7 @@
270(define (nfs-shepherd-services config) 270(define (nfs-shepherd-services config)
271 "Return a list of <shepherd-service> for the NFS daemons with CONFIG." 271 "Return a list of <shepherd-service> for the NFS daemons with CONFIG."
272 (match-record config <nfs-configuration> 272 (match-record config <nfs-configuration>
273 (nfs-utils nfs-version exports 273 (nfs-utils nfs-versions exports
274 rpcmountd-port rpcstatd-port nfsd-port nfsd-threads 274 rpcmountd-port rpcstatd-port nfsd-port nfsd-threads
275 pipefs-directory debug) 275 pipefs-directory debug)
276 (list (shepherd-service 276 (list (shepherd-service
@@ -323,15 +323,16 @@
323 (requirement '(/proc/fs/nfsd rpc.statd networking)) 323 (requirement '(/proc/fs/nfsd rpc.statd networking))
324 (start 324 (start
325 #~(lambda _ 325 #~(lambda _
326 (zero? (system* #$(file-append nfs-utils "/sbin/rpc.nfsd") 326 (zero? (apply system* #$(file-append nfs-utils "/sbin/rpc.nfsd")
327 #$@(if (member 'nfsd debug) 327 (list
328 '("--debug") 328 #$@(if (member 'nfsd debug)
329 '()) 329 '("--debug")
330 "--port" #$(number->string nfsd-port) 330 '())
331 #$@(if nfs-version 331 "--port" #$(number->string nfsd-port)
332 '("--nfs-version" nfs-version) 332 #$@(map (lambda (version)
333 '()) 333 (string-append "--nfs-version=" version))
334 #$(number->string nfsd-threads))))) 334 nfs-versions)
335 #$(number->string nfsd-threads))))))
335 (stop 336 (stop
336 #~(lambda _ 337 #~(lambda _
337 (zero? 338 (zero?