guix-commits
[Top][All Lists]
Advanced

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

03/09: services: agetty: 'stop' method does nothing when running is 'idl


From: guix-commits
Subject: 03/09: services: agetty: 'stop' method does nothing when running is 'idle.
Date: Sat, 20 May 2023 19:17:11 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit d99a4c4cb3b52b1ff9dc20ad05c51624256c6405
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Sat May 20 00:42:20 2023 +0200

    services: agetty: 'stop' method does nothing when running is 'idle.
    
    This is a followup to 57e731c358d000f614fbda23654cae6a5e79df80.
    
    * gnu/services/base.scm (agetty-shepherd-service): Change 'stop' method
    to return #f immediately when the running value is 'idle.
---
 gnu/services/base.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index fdc2c8c764..79c9661567 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1187,7 +1187,11 @@ no serial port console requested; doing nothing~%"
                                       '#$(car provision))
                               'idle)))
                 args)))))
-      (stop #~(make-kill-destructor))))))
+      (stop #~(let ((stop (make-kill-destructor)))
+                (lambda (running)
+                  (if (eq? 'idle running)
+                      #f
+                      (stop running)))))))))
 
 (define agetty-service-type
   (service-type (name 'agetty)



reply via email to

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