Commit ec5450c5 authored by Michael Biebl's avatar Michael Biebl

Don't start console-getty.service when /dev/console is missing

Avoids repeated unsuccessful start attempts of agetty inside (docker)
containers.

Closes: #829537
parent bb339e78
......@@ -11,6 +11,9 @@ systemd (215-17+deb8u5) UNRELEASED; urgency=medium
* Update links to kernel.org cgroup documentation.
The systemd.resource-control man page had references to /cgroups/ which
moved to /cgroup-v1/. (Closes: #819970)
* Don't start console-getty.service when /dev/console is missing.
Avoids repeated unsuccessful start attempts of agetty inside (docker)
containers. (Closes: #829537)
-- Michael Biebl <biebl@debian.org> Fri, 01 Jul 2016 17:35:05 +0200
......
From: Jan Pazdziora <jpazdziora@redhat.com>
Date: Fri, 13 Mar 2015 12:57:18 +0100
Subject: console-getty.service: don't start when /dev/console is missing
Create minimal image which runs systemd
FROM rhel7.1
RUN yum install -y /usr/bin/ps
ENV container docker
CMD [ "/usr/sbin/init" ]
When you run the container without -t, the process
/sbin/agetty --noclear --keep-baud console 115200 38400 9600
is not happy and checking the journal in the container, there is a stream of
Mar 13 04:50:15 11bf07f59fff agetty[66]: /dev/console: No such file or directory
Mar 13 04:50:25 11bf07f59fff systemd[1]: console-getty.service holdoff time over, scheduling restart.
Mar 13 04:50:25 11bf07f59fff systemd[1]: Stopping Console Getty...
Mar 13 04:50:25 11bf07f59fff systemd[1]: Starting Console Getty...
Mar 13 04:50:25 11bf07f59fff systemd[1]: Started Console Getty.
Mar 13 04:50:25 11bf07f59fff agetty[67]: /dev/console: No such file or directory
Mar 13 04:50:35 11bf07f59fff systemd[1]: console-getty.service holdoff time over, scheduling restart.
Mar 13 04:50:35 11bf07f59fff systemd[1]: Stopping Console Getty...
Mar 13 04:50:35 11bf07f59fff systemd[1]: Starting Console Getty...
Mar 13 04:50:35 11bf07f59fff systemd[1]: Started Console Getty.
Mar 13 04:50:35 11bf07f59fff agetty[74]: /dev/console: No such file or directory
Mar 13 04:50:45 11bf07f59fff systemd[1]: console-getty.service holdoff time over, scheduling restart.
Mar 13 04:50:45 11bf07f59fff systemd[1]: Stopping Console Getty...
Mar 13 04:50:45 11bf07f59fff systemd[1]: Starting Console Getty...
(cherry-picked from commit 1b41981d9a62443d566df6bcabc1b5024e9f5e4a)
---
units/console-getty.service.m4.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/units/console-getty.service.m4.in b/units/console-getty.service.m4.in
index 8ac51a4..413d940 100644
--- a/units/console-getty.service.m4.in
+++ b/units/console-getty.service.m4.in
@@ -9,6 +9,7 @@
Description=Console Getty
Documentation=man:agetty(8)
After=systemd-user-sessions.service plymouth-quit-wait.service
+ConditionPathExists=/dev/console
m4_ifdef(`HAVE_SYSV_COMPAT',
After=rc-local.service
)m4_dnl
......@@ -162,6 +162,7 @@ service-use-the-right-timeout-for-stop-processes-we-fork.patch
core-don-t-reset-log-level-to-NOTICE-if-we-get-quiet-on-t.patch
sd-event-fix-prepare-priority-queue-comparison-function.patch
man-update-links-to-kernel.org-cgroup-documentation.patch
console-getty.service-don-t-start-when-dev-console-is-mis.patch
## Debian specific patches:
Add-back-support-for-Debian-specific-config-files.patch
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment