services: agetty: Call default-serial-port only when starting.
* gnu/services/base.scm (agetty-shepherd-service): Call default-serial-port only when starting.
This commit is contained in:
parent
770986d541
commit
c32e3ddedd
@ -937,8 +937,10 @@ to use as the tty. This is primarily useful for headless systems."
|
||||
;; mingetty-shepherd-service).
|
||||
(requirement '(user-processes host-name udev))
|
||||
|
||||
(start #~(let ((tty #$(default-serial-port)))
|
||||
(if tty
|
||||
(start #~(lambda args
|
||||
(let ((defaulted-tty #$(or tty (default-serial-port))))
|
||||
(apply
|
||||
(if defaulted-tty
|
||||
(make-forkexec-constructor
|
||||
(list #$(file-append util-linux "/sbin/agetty")
|
||||
#$@extra-options
|
||||
@ -1042,14 +1044,15 @@ to use as the tty. This is primarily useful for headless systems."
|
||||
#$@(if login-pause?
|
||||
#~("--login-pause")
|
||||
#~())
|
||||
#$(or tty (default-serial-port))
|
||||
defaulted-tty
|
||||
#$@(if baud-rate
|
||||
#~(#$baud-rate)
|
||||
#~())
|
||||
#$@(if term
|
||||
#~(#$term)
|
||||
#~()))))
|
||||
(const #f))) ; never start.
|
||||
#~())))
|
||||
(const #f)) ; never start.
|
||||
args))))
|
||||
(stop #~(make-kill-destructor)))))))
|
||||
|
||||
(define agetty-service-type
|
||||
|
Loading…
Reference in New Issue
Block a user