diff options
author | Ludovic Courtès <ludo@gnu.org> | 2023-05-20 00:42:20 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2023-05-21 01:04:39 +0200 |
commit | d99a4c4cb3b52b1ff9dc20ad05c51624256c6405 (patch) | |
tree | d83b1efb12b23e567d9d6e306530f453ab81fa6e /gnu/services | |
parent | f52020ea99f59eae3537a22bb23305da90af310b (diff) |
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.
Diffstat (limited to 'gnu/services')
-rw-r--r-- | gnu/services/base.scm | 6 |
1 files changed, 5 insertions, 1 deletions
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) |