[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[shepherd] 07/08: squash! service: Use 'lookup-service' instead of 'look
From: |
Ludovic Courtès |
Subject: |
[shepherd] 07/08: squash! service: Use 'lookup-service' instead of 'lookup-services'. |
Date: |
Thu, 13 Apr 2023 05:43:12 -0400 (EDT) |
civodul pushed a commit to branch wip-goopsless
in repository shepherd.
commit 174457fd95bdffce1218d811c3455a18b3a0c212
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Apr 12 21:56:15 2023 +0200
squash! service: Use 'lookup-service' instead of 'lookup-services'.
* modules/shepherd/service.scm (deregister-service): Likewise.
---
modules/shepherd/service.scm | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/modules/shepherd/service.scm b/modules/shepherd/service.scm
index ffc9cd5..6c6b884 100644
--- a/modules/shepherd/service.scm
+++ b/modules/shepherd/service.scm
@@ -2420,10 +2420,10 @@ requested to be removed."
#t)
(else
;; Removing only one service.
- (match (lookup-services name)
- (() ; unknown service
+ (match (lookup-service name)
+ (#f
(raise (condition (&missing-service-error (name name)))))
- ((service) ; only SERVICE provides NAME
+ (service
;; Are we removing a user service…
(if (eq? (service-canonical-name service) name)
(local-output (l10n "Removing service '~a'...") name)
@@ -2432,11 +2432,7 @@ requested to be removed."
"Removing service '~a' providing '~a'..."
(service-canonical-name service) name))
(deregister service)
- (local-output (l10n "Done.")))
- ((services ...) ; ambiguous NAME
- (local-output
- "Not unloading: '~a' names several services: '~a'."
- name (map service-canonical-name services))))))))
+ (local-output (l10n "Done."))))))))
(define (load-config file-name)
(local-output (l10n "Loading ~a.") file-name)
- [shepherd] branch wip-goopsless updated (a353fa5 -> 89853a3), Ludovic Courtès, 2023/04/13
- [shepherd] 07/08: squash! service: Use 'lookup-service' instead of 'lookup-services'.,
Ludovic Courtès <=
- [shepherd] 05/08: service: Turn 'start' method into a procedure., Ludovic Courtès, 2023/04/13
- [shepherd] 03/08: service: Turn 'action' method into a procedure., Ludovic Courtès, 2023/04/13
- [shepherd] 08/08: service: 'stop-service' returns the list of stopped services, not names., Ludovic Courtès, 2023/04/13
- [shepherd] 01/08: monitoring: Log registered service names., Ludovic Courtès, 2023/04/13
- [shepherd] 02/08: service: Turn 'doc' method into a procedure., Ludovic Courtès, 2023/04/13
- [shepherd] 04/08: squash! service: Use 'lookup-service' instead of 'lookup-services'., Ludovic Courtès, 2023/04/13
- [shepherd] 06/08: service: Turn 'stop' method into a procedure., Ludovic Courtès, 2023/04/13