[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] gnu: Add rpc-daemon service
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH] gnu: Add rpc-daemon service |
Date: |
Mon, 05 Sep 2016 22:44:28 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
John Darrington <address@hidden> skribis:
> * gnu/services/nfs.scm: New file.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
[...]
> address@hidden rpcbind
> address@hidden Rpcbind Service
s/Rpcbind/RPC Bind/
Also move the @cindex line after @subsubheading.
> +The @code{(gnu services rpcbind)} module provides the following service.
> +
> address@hidden {Scheme Procedure} rpcbind-service [#:rpcbind rpcbind] @
> + [#:warm-start? #t]
This procedure no longer exists. :-)
So instead, you need to add an @defvr for ‘rpcbind-service-type’ and an
@deftp for ‘rpcbind-configuration’, and a couple of sentences to glues
them together (see “Scheduled Job Execution” for an example.)
> +(define (rpcbind-shepherd-service config)
> + (define pkg
> + (rpcbind-configuration-rpcbind config))
> +
> + (define rpcbind-command
> + #~(list (string-append #$pkg "/bin/rpcbind") "-f"
> + #$@(if (rpcbind-configuration-warm-start? config) '("-w") '())))
> +
> + (list (shepherd-service
> + (provision '(rpcbind-daemon))
> + (requirement '(networking))
> + (start #~(make-forkexec-constructor #$rpcbind-command))
> + (stop #~(make-kill-destructor)))))
> +
> +(define rpcbind-service-type
> + (service-type
> + (name 'rpcbind)
> + (extensions (list (service-extension shepherd-root-service-type
> + rpcbind-shepherd-service)))))
Better use ‘shepherd-service-type’ here, as noted at
<https://lists.gnu.org/archive/html/guix-devel/2016-09/msg00271.html>.
And then we’re done. Could you send an updated patch?
Thank you for your patience!
Ludo’.