aboutsummaryrefslogtreecommitdiff
path: root/gnu/services/shepherd.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2016-02-03 21:59:47 +0100
committerLudovic Courtès <ludo@gnu.org>2016-02-03 22:28:28 +0100
commit240b57f0ca576708ebf6cfa0dfe2803fa9ff2323 (patch)
tree9a4c4cfaf298bad165e035e6744eccdd628169dd /gnu/services/shepherd.scm
parent98416109d571c5c8c643064e5e3365dde8abbe0b (diff)
downloadguix-240b57f0ca576708ebf6cfa0dfe2803fa9ff2323.tar
guix-240b57f0ca576708ebf6cfa0dfe2803fa9ff2323.tar.gz
guix system: 'reconfigure' loads and starts new services.
Partly fixes <http://bugs.gnu.org/22039>. * gnu/services/herd.scm: New file. * gnu-system.am (GNU_SYSTEM_MODULES): Add it. * gnu/services/shepherd.scm (shepherd-service-canonical-name): New procedure. (shepherd-service-file): Export. * guix/scripts/system.scm (upgrade-shepherd-services): New procedure. (switch-to-system): Use it. * guix/ui.scm (info): New procedure. * doc/guix.texi (Invoking guix system): Mention system services.
Diffstat (limited to 'gnu/services/shepherd.scm')
-rw-r--r--gnu/services/shepherd.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm
index 36ed9eb1c0..6cf15a5e00 100644
--- a/gnu/services/shepherd.scm
+++ b/gnu/services/shepherd.scm
@@ -40,6 +40,7 @@
shepherd-service?
shepherd-service-documentation
shepherd-service-provision
+ shepherd-service-canonical-name
shepherd-service-requirement
shepherd-service-respawn?
shepherd-service-start
@@ -51,6 +52,8 @@
%default-imported-modules
%default-modules
+ shepherd-service-file
+
shepherd-service-back-edges))
;;; Commentary:
@@ -139,6 +142,9 @@ for a service that extends SHEPHERD-ROOT-SERVICE-TYPE and nothing else."
(imported-modules shepherd-service-imported-modules ;list of module names
(default %default-imported-modules)))
+(define (shepherd-service-canonical-name service)
+ "Return the 'canonical name' of SERVICE."
+ (first (shepherd-service-provision service)))
(define (assert-valid-graph services)
"Raise an error if SERVICES does not define a valid shepherd service graph,