diff options
| author | Ricardo Wurmus <rekado@elephly.net> | 2020-03-27 15:24:54 +0100 |
|---|---|---|
| committer | Ricardo Wurmus <rekado@elephly.net> | 2020-03-27 15:30:44 +0100 |
| commit | bc3fda5d2b97526cee7d1b127e95067521dfb99e (patch) | |
| tree | 337176a1c0ee203ca605312bae79377b618b6f11 /gnu/services/nfs.scm | |
| parent | 9483782a617c66b8e066ac7f1898e41f99eb8456 (diff) | |
services/nfs: Replace nfs-version with nfs-versions.
Instead of accepting a string for just one protocol version accept a list of
supported versions.
* gnu/services/nfs.scm (<nfs-configuration>)[nfs-version]: Remove field and
replace...
[nfs-versions]: ...with this new field.
(nfs-shepherd-services): Pass as many "--nfs-version" options as there are
supported versions.
* doc/guix.texi (Network File System): Document nfs-versions.
Diffstat (limited to 'gnu/services/nfs.scm')
| -rw-r--r-- | gnu/services/nfs.scm | 25 |
1 files changed, 13 insertions, 12 deletions
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? |
