[PATCH 0/3] Make console agetty wait for syslogd to start up

  • Done
  • quality assurance status badge
Details
One participant
  • dannym
Owner
unassigned
Submitted by
dannym
Severity
normal

Debbugs page

dannym wrote 3 years ago
(address . guix-patches@gnu.org)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
20220203205243.25095-1-dannym@scratchpost.org
From: Danny Milosavljevic <dannym@scratchpost.org>

This patchset makes the console agetty wait for syslogd to start up.

See also bug# 30464.

Danny Milosavljevic (3):
services: agetty: Add shepherd-requirement.
services: %base-services: Adapt agetty-service-type to depend on
syslogd.
agetty-shepherd-service: Rename console agetty to "term-console" for
clarity.

doc/guix.texi | 4 ++++
gnu/services/base.scm | 15 ++++++++++-----
2 files changed, 14 insertions(+), 5 deletions(-)

--
2.34.0
dannym wrote 3 years ago
[PATCH 2/3] services: %base-services: Adapt agetty-service-type to depend on syslogd.
(address . 53763@debbugs.gnu.org)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
20220203205521.25145-2-dannym@scratchpost.org
From: Danny Milosavljevic <dannym@scratchpost.org>


* gnu/services/base.scm (%base-services): Reorder syslog-service for clarity.
[shepherd-requirement]: New field.
---
gnu/services/base.scm | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

Toggle diff (28 lines)
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index d6f584abdb..028426c3f8 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -2787,10 +2787,12 @@ (define %base-services
(cons tty %default-console-font))
'("tty1" "tty2" "tty3" "tty4" "tty5" "tty6")))
+ (syslog-service)
(service agetty-service-type (agetty-configuration
(extra-options '("-L")) ; no carrier detect
(term "vt100")
- (tty #f))) ; automatic
+ (tty #f) ; automatic
+ (shepherd-requirement '(syslogd))))
(service mingetty-service-type (mingetty-configuration
(tty "tty1")))
@@ -2807,7 +2809,6 @@ (define %base-services
(service static-networking-service-type
(list %loopback-static-networking))
- (syslog-service)
(service urandom-seed-service-type)
(service guix-service-type)
(service nscd-service-type)
--
2.34.0
dannym wrote 3 years ago
[PATCH 3/3] agetty-shepherd-service: Rename console agetty to "term-console" for clarity.
(address . 53763@debbugs.gnu.org)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
20220203205521.25145-3-dannym@scratchpost.org
From: Danny Milosavljevic <dannym@scratchpost.org>

* gnu/services/base.scm (agetty-shepherd-service)[provision]: Rename console
agetty to "term-console".
---
gnu/services/base.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Toggle diff (15 lines)
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 028426c3f8..12a3ef2e93 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -931,7 +931,7 @@ (define agetty-shepherd-service
(list
(shepherd-service
(documentation "Run agetty on a tty.")
- (provision (list (symbol-append 'term- (string->symbol (or tty "auto")))))
+ (provision (list (symbol-append 'term- (string->symbol (or tty "console")))))
;; 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
--
2.34.0
dannym wrote 3 years ago
[PATCH 1/3] services: agetty: Add shepherd-requirement.
(address . 53763@debbugs.gnu.org)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
20220203205521.25145-1-dannym@scratchpost.org
From: Danny Milosavljevic <dannym@scratchpost.org>

* gnu/services/base.scm (<agetty-configuration>): Add shepherd-requirement.
* doc/guix.texi (agetty-configuration): Document it.
---
doc/guix.texi | 4 ++++
gnu/services/base.scm | 8 ++++++--
2 files changed, 10 insertions(+), 2 deletions(-)

Toggle diff (50 lines)
diff --git a/doc/guix.texi b/doc/guix.texi
index aaa7cbb66f..68c4c4086a 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -16634,6 +16634,10 @@ This option accepts, as an integer, the nice value with which to run the
This option provides an ``escape hatch'' for the user to provide arbitrary
command-line arguments to @command{agetty} as a list of strings.
+@item @code{shepherd-requirement} (default: @code{'()})
+The option can be used to provides extra shepherd requirements (for example
+@code{'syslogd}) to the respective @code{'term-}* shepherd service.
+
@end table
@end deftp
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index fbd01e84d6..d6f584abdb 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -876,6 +876,8 @@ (define-record-type* <agetty-configuration>
;; "Escape hatch" for passing arbitrary command-line arguments.
(extra-options agetty-extra-options ;list of strings
(default '()))
+ (shepherd-requirement agetty-shepherd-requirement ;list of SHEPHERD requirements
+ (default '()))
;;; XXX Unimplemented for now!
;;; (issue-file agetty-issue-file ;file-like
;;; (default #f))
@@ -924,7 +926,8 @@ (define agetty-shepherd-service
host no-issue? init-string no-clear? local-line extract-baud?
skip-login? no-newline? login-options chroot hangup? keep-baud? timeout
detect-case? wait-cr? no-hints? no-hostname? long-hostname?
- erase-characters kill-characters chdir delay nice extra-options)
+ erase-characters kill-characters chdir delay nice extra-options
+ shepherd-requirement)
(list
(shepherd-service
(documentation "Run agetty on a tty.")
@@ -934,7 +937,8 @@ (define agetty-shepherd-service
;; service to be done. Also wait for udev essentially so that the tty
;; text is not lost in the middle of kernel messages (see also
;; mingetty-shepherd-service).
- (requirement '(user-processes host-name udev))
+ (requirement (cons* 'user-processes 'host-name 'udev
+ shepherd-requirement))
(modules '((ice-9 match) (gnu build linux-boot)))
(start
--
2.34.0
Danny Milosavljevic wrote 3 years ago
Re: [PATCH 0/3] Make console agetty wait for syslogd to start up
20220225171738.296d1a25@scratchpost.org
Pushed agetty changes as commits ed17082d94bdcdb67713e95d181061d179299aad, fcb6cab62149fd46d9fe496b91cc019a43774a43, 07c3a439555113bdd0bd416265221063d263f44c.
-----BEGIN PGP SIGNATURE-----

iQEzBAEBCgAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAmIZASIACgkQ5xo1VCww
uqVyZQf8CSv33uhNWAxCDjWHePLx5Im+XgnaXju4BprxOf4wLkYu3DWdZfo+jFER
vXzeofIbnBZFeDEOtCxfFbpuXTi9UwPXWJL/Ba6pz+nrcnU37aQyApVQZgHfytLS
3goV2iLTh6reAX7nZzUyvGclP5HumbJLxguByK0uOLp8XPvJp7tYwt2xjiQNYR2r
9/BedNcOlzjqz0j3WrWxeOj3UYKHboGM2fqQjCcCrnGiTL0ZON3E2/CuB9ts+m+O
1XuM/7NZDRDtHRmYVItIA3tyw4TYSl9vp78qtE35Z6QMNjZREoYk4QOMANX5LCXj
LETOE8ajWNQs4vceJHTmZzfLw/To6g==
=Ccqf
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 53763@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 53763
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help