From: Michael Prokop Date: Fri, 2 Sep 2022 15:02:07 +0000 (+0200) Subject: systemd unit: use StandardInput=null to work in serial console mode X-Git-Tag: v0.20.3~1 X-Git-Url: https://git.grml.org/?p=grml-autoconfig.git;a=commitdiff_plain;h=1e268ffe4f787e0fbe91b77792d6662d009e0a31 systemd unit: use StandardInput=null to work in serial console mode We shouldn't need standard input connected to a TTY, but when booting in serial console mode (like `console=tty1 console=ttyS0,9600n8`), then grml-autoconfig service fails with: | systemd[1]: Starting Grml boot option support... | systemd[1]: grml-autoconfig.service: Main process exited, code=exited, status=1/FAILURE | systemd[1]: grml-autoconfig.service: Failed with result 'exit-code'. | systemd[1]: Failed to start Grml boot option support. | systemd[1]: grml-autoconfig.service: Consumed 2.475s CPU time. Replacing `StandardInput=tty` with `StandardInput=null` fixes this, while non-serial console mode seems to continue working fine. Closes: https://github.com/grml/grml/issues/176 --- diff --git a/systemd/grml-autoconfig.service b/systemd/grml-autoconfig.service index c2a1c99..c026713 100644 --- a/systemd/grml-autoconfig.service +++ b/systemd/grml-autoconfig.service @@ -8,7 +8,7 @@ After=rc-local.service [Service] ExecStart=/etc/init.d/grml-autoconfig Type=oneshot -StandardInput=tty +StandardInput=null StandardOutput=tty [Install]