diff options
author | Mathieu Othacehe <m.othacehe@gmail.com> | 2017-04-28 17:09:53 +0200 |
---|---|---|
committer | Mathieu Othacehe <m.othacehe@gmail.com> | 2017-05-03 11:35:25 +0200 |
commit | 5e03b122cf295d24e01861ca942505d47f9aa59e (patch) | |
tree | 8d620cd189abc6a1a1f86eb000f923e768888dd9 /gnu/services | |
parent | 4b13e28a8d336d693ed0392b660e48d6847a8bcf (diff) | |
download | guix-5e03b122cf295d24e01861ca942505d47f9aa59e.tar guix-5e03b122cf295d24e01861ca942505d47f9aa59e.tar.gz |
services: herd: Make %shepherd-socket-file a parameter and export it.
* gnu/services/herd.scm (%shepherd-socket-file): Make it an exported
parameter.
(open-connection): Adapt.
Diffstat (limited to 'gnu/services')
-rw-r--r-- | gnu/services/herd.scm | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gnu/services/herd.scm b/gnu/services/herd.scm index 03bfbf1d78..f8d60a4802 100644 --- a/gnu/services/herd.scm +++ b/gnu/services/herd.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -23,7 +24,9 @@ #:use-module (srfi srfi-34) #:use-module (srfi srfi-35) #:use-module (ice-9 match) - #:export (shepherd-error? + #:export (%shepherd-socket-file + + shepherd-error? service-not-found-error? service-not-found-error-service action-not-found-error? @@ -58,9 +61,9 @@ ;;; Code: (define %shepherd-socket-file - "/var/run/shepherd/socket") + (make-parameter "/var/run/shepherd/socket")) -(define* (open-connection #:optional (file %shepherd-socket-file)) +(define* (open-connection #:optional (file (%shepherd-socket-file))) "Open a connection to the daemon, using the Unix-domain socket at FILE, and return the socket." ;; The protocol is sexp-based and UTF-8-encoded. |