aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorTomas Volf <~@wolfsden.cz>2024-12-13 17:27:46 +0100
committerMaxim Cournoyer <maxim.cournoyer@gmail.com>2024-12-15 00:19:41 +0900
commite92b20a41a026b8af7dd2031eb61267b061617b5 (patch)
treeb827dbe88af30765e3629c8ed3d60e0dbdd91a00 /gnu
parenta64a3a14e8be7c67cd5fc72d87438dbfcb831a30 (diff)
downloadguix-e92b20a41a026b8af7dd2031eb61267b061617b5.tar
guix-e92b20a41a026b8af7dd2031eb61267b061617b5.tar.gz
services: mingetty: Support waiting on shepherd services.
For auto-login on systems with elogind, dbus-system needs to be started. This commit adds ability to express that ordering. * gnu/services/base.scm (<mingetty-configuration>): Add shepherd-requirement field. (mingetty-shepherd-service): Use it. * doc/guix.texi (Base Services)<mingetty-configuration>: Document it. Change-Id: Iedbdc4375180740379d561aa193d7c63350d2e7b Modified-by: Maxim Cournoyer <maxim.cournoyer@gmail.com> Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Diffstat (limited to 'gnu')
-rw-r--r--gnu/services/base.scm61
1 files changed, 33 insertions, 28 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 7350425bb9..766371ecf1 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -193,6 +193,7 @@
mingetty-configuration-nice
mingetty-configuration-working-directory
mingetty-configuration-root-directory
+ mingetty-configuration-shepherd-requirement
mingetty-configuration?
mingetty-service ; deprecated
mingetty-service-type
@@ -1246,45 +1247,49 @@ the tty to run, among other things."
(define-record-type* <mingetty-configuration>
mingetty-configuration make-mingetty-configuration
mingetty-configuration?
- (mingetty mingetty-configuration-mingetty ;file-like
- (default mingetty))
- (tty mingetty-configuration-tty) ;string
- (auto-login mingetty-configuration-auto-login ;string | #f
- (default #f))
- (login-program mingetty-configuration-login-program ;gexp
- (default #f))
- (login-pause? mingetty-configuration-login-pause? ;boolean
- (default #f))
- (clear-on-logout? mingetty-configuration-clear-on-logout? ;boolean
- (default #t))
- (delay mingetty-configuration-delay ;integer | #f
- (default #f))
- (print-issue mingetty-configuration-print-issue ;boolean | symbol
- (default #t))
- (print-hostname mingetty-configuration-print-hostname ;boolean | symbol
- (default #t))
- (nice mingetty-configuration-nice ;integer | #f
- (default #f))
- (working-directory mingetty-configuration-working-directory ;string | #f
- (default #f))
- (root-directory mingetty-configuration-root-directory ;string | #f
- (default #f)))
+ (mingetty mingetty-configuration-mingetty ;file-like
+ (default mingetty))
+ (tty mingetty-configuration-tty) ;string
+ (auto-login mingetty-configuration-auto-login ;string | #f
+ (default #f))
+ (login-program mingetty-configuration-login-program ;gexp
+ (default #f))
+ (login-pause? mingetty-configuration-login-pause? ;boolean
+ (default #f))
+ (clear-on-logout? mingetty-configuration-clear-on-logout? ;boolean
+ (default #t))
+ (delay mingetty-configuration-delay ;integer | #f
+ (default #f))
+ (print-issue mingetty-configuration-print-issue ;boolean | Symbol
+ (default #t))
+ (print-hostname mingetty-configuration-print-hostname ;boolean | Symbol
+ (default #t))
+ (nice mingetty-configuration-nice ;integer | #f
+ (default #f))
+ (working-directory mingetty-configuration-working-directory ;string | #f
+ (default #f))
+ (root-directory mingetty-configuration-root-directory ;string | #f
+ (default #f))
+ (shepherd-requirement mingetty-configuration-shepherd-requirement
+ ;; Since the login prompt shows the host name, wait
+ ;; for the 'host-name' service to be done. Also wait
+ ;; for udev essentially so that the tty text is not
+ ;; lost in the middle of kernel messages (XXX).
+ (default '(user-processes host-name udev
+ virtual-terminal))))
(define (mingetty-shepherd-service config)
(match-record config <mingetty-configuration>
( mingetty tty auto-login login-program
login-pause? clear-on-logout? delay
print-issue print-hostname nice
- working-directory root-directory)
+ working-directory root-directory shepherd-requirement)
(list
(shepherd-service
(documentation "Run mingetty on an tty.")
(provision (list (symbol-append 'term- (string->symbol tty))))
- ;; Since the login prompt shows the host name, wait for the 'host-name'
- ;; service to be done. Also wait for udev essentially so that the tty
- ;; text is not lost in the middle of kernel messages (XXX).
- (requirement '(user-processes host-name udev virtual-terminal))
+ (requirement shepherd-requirement)
(start #~(make-forkexec-constructor
(list #$(file-append mingetty "/sbin/mingetty")