all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add rpc-daemon service
@ 2016-09-03  6:39 John Darrington
  2016-09-03 14:11 ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: John Darrington @ 2016-09-03  6:39 UTC (permalink / raw)
  To: guix-devel; +Cc: John Darrington

* 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

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-09-07 12:17 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-03  6:39 [PATCH] gnu: Add rpc-daemon service John Darrington
2016-09-03 14:11 ` 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

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.