[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/10: services: 'dmd-service-type' takes a service name.
From: |
Ludovic Courtès |
Subject: |
04/10: services: 'dmd-service-type' takes a service name. |
Date: |
Wed, 14 Oct 2015 19:46:08 +0000 |
civodul pushed a commit to branch master
in repository guix.
commit 00184239c34694ba3005bccde498ae5962c06758
Author: Ludovic Courtès <address@hidden>
Date: Wed Oct 14 15:09:18 2015 +0200
services: 'dmd-service-type' takes a service name.
* gnu/services/dmd.scm (dmd-service-type): Add 'service-name'
parameter.
* gnu/services/base.scm, gnu/services/networking.scm,
gnu/system/install.scm: Adjust callers.
---
gnu/services/base.scm | 12 +++++++++++-
gnu/services/dmd.scm | 4 ++--
gnu/services/networking.scm | 2 ++
gnu/system/install.scm | 1 +
4 files changed, 16 insertions(+), 3 deletions(-)
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index adafe1b..84869ae 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -125,7 +125,8 @@
(respawn? #f)))
(define root-file-system-service-type
- (dmd-service-type (const %root-file-system-dmd-service)))
+ (dmd-service-type 'root-file-system
+ (const %root-file-system-dmd-service)))
(define (root-file-system-service)
"Return a service whose sole purpose is to re-mount read-only the root file
@@ -145,6 +146,7 @@ FILE-SYSTEM."
;; TODO(?): Make this an extensible service that takes <file-system> objects
;; and returns a list of <dmd-service>.
(dmd-service-type
+ 'file-system
(lambda (file-system)
(let ((target (file-system-mount-point file-system))
(device (file-system-device file-system))
@@ -205,6 +207,7 @@ object."
(define user-unmount-service-type
(dmd-service-type
+ 'user-unmount
(lambda (known-mount-points)
(dmd-service
(documentation "Unmount manually-mounted file systems.")
@@ -242,6 +245,7 @@ in KNOWN-MOUNT-POINTS when it is stopped."
(define user-processes-service-type
(dmd-service-type
+ 'user-processes
(match-lambda
((requirements grace-delay)
(dmd-service
@@ -337,6 +341,7 @@ stopped before 'kill' is called."
(define host-name-service-type
(dmd-service-type
+ 'host-name
(lambda (name)
(dmd-service
(documentation "Initialize the machine's host name.")
@@ -369,6 +374,7 @@ stopped before 'kill' is called."
(define console-keymap-service-type
(dmd-service-type
+ 'console-keymap
(lambda (file)
(dmd-service
(documentation (string-append "Load console keymap (loadkeys)."))
@@ -384,6 +390,7 @@ stopped before 'kill' is called."
(define console-font-service-type
(dmd-service-type
+ 'console-font
(match-lambda
((tty font)
(let ((device (string-append "/dev/" tty)))
@@ -644,6 +651,7 @@ Service Switch}, for an example."
(define syslog-service-type
(dmd-service-type
+ 'syslog
(lambda (config-file)
(dmd-service
(documentation "Run the syslog daemon (syslogd).")
@@ -982,6 +990,7 @@ extra rules from the packages listed in @var{rules}."
(define device-mapping-service-type
(dmd-service-type
+ 'device-mapping
(match-lambda
((target open close)
(dmd-service
@@ -1001,6 +1010,7 @@ gexp, to open it, and evaluate @var{close} to close it."
(define swap-service-type
(dmd-service-type
+ 'swap
(lambda (device)
(define requirement
(if (string-prefix? "/dev/mapper/" device)
diff --git a/gnu/services/dmd.scm b/gnu/services/dmd.scm
index 6020ffc..418511b 100644
--- a/gnu/services/dmd.scm
+++ b/gnu/services/dmd.scm
@@ -86,11 +86,11 @@
;; <dmd-service> objects.
(service dmd-root-service-type '()))
-(define-syntax-rule (dmd-service-type proc)
+(define-syntax-rule (dmd-service-type service-name proc)
"Return a <service-type> denoting a simple dmd service--i.e., the type for a
service that extends DMD-ROOT-SERVICE-TYPE and nothing else."
(service-type
- (name 'some-dmd-service)
+ (name service-name)
(extensions
(list (service-extension dmd-root-service-type
(compose list proc))))))
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 52a843b..003d5a5 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -94,6 +94,7 @@ fe80::1%lo0 apps.facebook.com\n")
(define static-networking-service-type
(dmd-service-type
+ 'static-networking
(match-lambda
(($ <static-networking> interface ip gateway provision
name-servers net-tools)
@@ -166,6 +167,7 @@ gateway."
(define dhcp-client-service-type
(dmd-service-type
+ 'dhcp-client
(lambda (dhcp)
(define dhclient
#~(string-append #$dhcp "/sbin/dhclient"))
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index a91c5c3..1686cbd 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -162,6 +162,7 @@ current store is on a RAM disk."
(define cow-store-service-type
(dmd-service-type
+ 'cow-store
(lambda _
(dmd-service
(requirement '(root-file-system user-processes))
- branch master updated (d9c44e9 -> 5f44ee4), Ludovic Courtès, 2015/10/14
- 08/10: services: Add 'dmd-service-back-edges'., Ludovic Courtès, 2015/10/14
- 06/10: guix system: Add 'extension-graph' command., Ludovic Courtès, 2015/10/14
- 09/10: guix system: Add 'dmd-graph' command., Ludovic Courtès, 2015/10/14
- 05/10: graph: 'export-graph' takes a #:reverse-edges? parameter., Ludovic Courtès, 2015/10/14
- 07/10: services: Prefix <dmd-service> accessors with 'dmd-'., Ludovic Courtès, 2015/10/14
- 10/10: services: Unmount user file systems after process termination., Ludovic Courtès, 2015/10/14
- 01/10: hydra: Add Graphviz and help2man as inputs to the Guix job set., Ludovic Courtès, 2015/10/15
- 02/10: build-system/gnu: dist-package: Use 'autoconf-wrapper'., Ludovic Courtès, 2015/10/15
- 04/10: services: 'dmd-service-type' takes a service name.,
Ludovic Courtès <=
- 03/10: services: Export 'service-back-edges'., Ludovic Courtès, 2015/10/15