From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Darrington Subject: [PATCH] gnu: Add rpc-daemon service Date: Sat, 3 Sep 2016 08:39:42 +0200 Message-ID: <1472884782-27956-1-git-send-email-jmd@gnu.org> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bg4cZ-0004kZ-11 for guix-devel@gnu.org; Sat, 03 Sep 2016 02:40:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bg4cU-0008QU-Bw for guix-devel@gnu.org; Sat, 03 Sep 2016 02:40:05 -0400 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org 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