guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[shepherd] 03/06: herd: Distinguish one-shot and transient services in e


From: Ludovic Courtès
Subject: [shepherd] 03/06: herd: Distinguish one-shot and transient services in event log.
Date: Wed, 26 Apr 2023 18:10:19 -0400 (EDT)

civodul pushed a commit to branch master
in repository shepherd.

commit dc41b253fc5bb6c3ace6bfce76ba903af2e78e32
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Wed Apr 26 15:03:49 2023 +0200

    herd: Distinguish one-shot and transient services in event log.
    
    * modules/shepherd/scripts/herd.scm (display-event-log): Distinguish
    transient and one-shot services when rendering 'stopped' service.
---
 modules/shepherd/scripts/herd.scm | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/modules/shepherd/scripts/herd.scm 
b/modules/shepherd/scripts/herd.scm
index 8aa62b3..8c895c0 100644
--- a/modules/shepherd/scripts/herd.scm
+++ b/modules/shepherd/scripts/herd.scm
@@ -292,8 +292,18 @@ into a @code{live-service} record."
                     (format #t (highlight (l10n "service ~a is running~%"))
                             name))
                    ('stopped
-                    (format #t (highlight/warn (l10n "service ~a is 
stopped~%"))
-                            name))
+                    (cond ((live-service-one-shot? service)
+                           (format #t (l10n "service ~a is done (one-shot)~%")
+                                   name))
+                          ((live-service-transient? service)
+                           (format #t
+                                   (highlight/warn
+                                    (l10n "service ~a is done (transient)~%"))
+                                   name))
+                          (else
+                           (format #t (highlight/warn
+                                       (l10n "service ~a is stopped~%"))
+                                   name))))
                    ('starting
                     (format #t (l10n "service ~a is being started~%")
                             name))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]