mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 21:38:07 -05:00
services: nfs: Expose configuration options for TCP and UDP.
* gnu/services/nfs.scm (<nfs-configuration>)[nfsd-tcp?, nfsd-udp?]: New fields. (nfs-shepherd-services)[rpc.nfsd]: Populate the --{no-,}tcp and --{no-,}udp command line options based on the values of the nfsd-tcp? and nfsd-upd? fields. * doc/guix.texi (Network File System): Add doc.
This commit is contained in:
parent
49de32748d
commit
c08fac0f7d
2 changed files with 19 additions and 1 deletions
|
@ -22858,6 +22858,12 @@ The network port that the @command{nfsd} daemon should use.
|
||||||
@item @code{nfsd-threads} (default: @code{8})
|
@item @code{nfsd-threads} (default: @code{8})
|
||||||
The number of threads used by the @command{nfsd} daemon.
|
The number of threads used by the @command{nfsd} daemon.
|
||||||
|
|
||||||
|
@item @code{nfsd-tcp?} (default: @code{#t})
|
||||||
|
Whether the @command{nfsd} daemon should listen on a TCP socket.
|
||||||
|
|
||||||
|
@item @code{nfsd-udp?} (default: @code{#f})
|
||||||
|
Whether the @command{nfsd} daemon should listen on a UDP socket.
|
||||||
|
|
||||||
@item @code{pipefs-directory} (default: @code{"/var/lib/nfs/rpc_pipefs"})
|
@item @code{pipefs-directory} (default: @code{"/var/lib/nfs/rpc_pipefs"})
|
||||||
The directory where the pipefs file system is mounted.
|
The directory where the pipefs file system is mounted.
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
;;; GNU Guix --- Functional package management for GNU
|
;;; GNU Guix --- Functional package management for GNU
|
||||||
;;; Copyright © 2016 John Darrington <jmd@gnu.org>
|
;;; Copyright © 2016 John Darrington <jmd@gnu.org>
|
||||||
;;; Copyright © 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
|
;;; Copyright © 2018, 2019, 2020 Ricardo Wurmus <rekado@elephly.net>
|
||||||
|
;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -261,6 +262,10 @@ (define-record-type* <nfs-configuration>
|
||||||
(default 2049))
|
(default 2049))
|
||||||
(nfsd-threads nfs-configuration-nfsd-threads
|
(nfsd-threads nfs-configuration-nfsd-threads
|
||||||
(default 8))
|
(default 8))
|
||||||
|
(nfsd-tcp? nfs-configuration-nfsd-tcp?
|
||||||
|
(default #t))
|
||||||
|
(nfsd-udp? nfs-configuration-nfsd-udp?
|
||||||
|
(default #f))
|
||||||
(pipefs-directory nfs-configuration-pipefs-directory
|
(pipefs-directory nfs-configuration-pipefs-directory
|
||||||
(default default-pipefs-directory))
|
(default default-pipefs-directory))
|
||||||
;; List of modules to debug; any of nfsd, nfs, rpc, idmap, statd, or mountd.
|
;; List of modules to debug; any of nfsd, nfs, rpc, idmap, statd, or mountd.
|
||||||
|
@ -272,6 +277,7 @@ (define (nfs-shepherd-services config)
|
||||||
(match-record config <nfs-configuration>
|
(match-record config <nfs-configuration>
|
||||||
(nfs-utils nfs-versions exports
|
(nfs-utils nfs-versions exports
|
||||||
rpcmountd-port rpcstatd-port nfsd-port nfsd-threads
|
rpcmountd-port rpcstatd-port nfsd-port nfsd-threads
|
||||||
|
nfsd-tcp? nfsd-udp?
|
||||||
pipefs-directory debug)
|
pipefs-directory debug)
|
||||||
(list (shepherd-service
|
(list (shepherd-service
|
||||||
(documentation "Mount the nfsd pseudo file system.")
|
(documentation "Mount the nfsd pseudo file system.")
|
||||||
|
@ -332,7 +338,13 @@ (define (nfs-shepherd-services config)
|
||||||
#$@(map (lambda (version)
|
#$@(map (lambda (version)
|
||||||
(string-append "--nfs-version=" version))
|
(string-append "--nfs-version=" version))
|
||||||
nfs-versions)
|
nfs-versions)
|
||||||
#$(number->string nfsd-threads))))))
|
#$(number->string nfsd-threads)
|
||||||
|
#$(if nfsd-tcp?
|
||||||
|
"--tcp"
|
||||||
|
"--no-tcp")
|
||||||
|
#$(if nfsd-udp?
|
||||||
|
"--udp"
|
||||||
|
"--no-udp"))))))
|
||||||
(stop
|
(stop
|
||||||
#~(lambda _
|
#~(lambda _
|
||||||
(zero?
|
(zero?
|
||||||
|
|
Loading…
Reference in a new issue