unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: John Darrington <jmd@gnu.org>
To: guix-devel@gnu.org
Cc: John Darrington <jmd@gnu.org>
Subject: [PATCH] gnu: Add rpc-daemon service
Date: Sat,  3 Sep 2016 08:39:42 +0200	[thread overview]
Message-ID: <1472884782-27956-1-git-send-email-jmd@gnu.org> (raw)

* gnu/services/nfs: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
 gnu/local.mk         |  1 +
 gnu/services/nfs.scm | 25 +++++++++++++++++++++++++
 2 files changed, 26 insertions(+)
 create mode 100644 gnu/services/nfs.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index efb00b9..8d2de1d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -388,6 +388,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/services/mail.scm				\
   %D%/services/mcron.scm			\
   %D%/services/networking.scm			\
+  %D%/services/nfs.scm			\
   %D%/services/shepherd.scm			\
   %D%/services/herd.scm				\
   %D%/services/spice.scm				\
diff --git a/gnu/services/nfs.scm b/gnu/services/nfs.scm
new file mode 100644
index 0000000..2ff5a36
--- /dev/null
+++ b/gnu/services/nfs.scm
@@ -0,0 +1,25 @@
+(define-module (gnu services nfs)
+  #:use-module (gnu)
+  #:use-module (gnu services shepherd)
+  #:use-module (gnu packages onc-rpc)
+  #:use-module (guix)
+  #:export (rpc-service))
+
+(define (rpc-shepherd-service config) ; Config is ignored
+  (list (shepherd-service
+         (provision '(rpc-daemon))
+         (requirement '(networking))
+         (start #~(make-forkexec-constructor
+                   (list (string-append #$rpcbind "/bin/rpcbind") "-d" "-f")))
+         (stop #~(make-kill-destructor)))))
+
+(define rpc-service-type
+  (service-type
+   (name 'rpc)
+   (extensions (list (service-extension shepherd-root-service-type
+                                        rpc-shepherd-service)))))
+
+(define* (rpc-service config)
+  "Run the rpc daemon. Config is ignored."
+  (service rpc-service-type config))
+
-- 
2.1.4

             reply	other threads:[~2016-09-03  6:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-03  6:39 John Darrington [this message]
2016-09-03 14:11 ` [PATCH] gnu: Add rpc-daemon service Ludovic Courtès
2016-09-03 14:54   ` John Darrington
2016-09-05 20:38     ` Ludovic Courtès
2016-09-05 19:22   ` John Darrington
2016-09-05 20:44     ` Ludovic Courtès
2016-09-06 16:50       ` John Darrington
2016-09-07 12:17         ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1472884782-27956-1-git-send-email-jmd@gnu.org \
    --to=jmd@gnu.org \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).