teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame SOURCES/0150-console-getty.service-don-t-start-when-dev-console-i.patch

1ff636
From c37bc5ac3a7282cccd090d20a3cf7120e31c4ee5 Mon Sep 17 00:00:00 2001
1ff636
From: Jan Pazdziora <jpazdziora@redhat.com>
1ff636
Date: Fri, 13 Mar 2015 12:57:18 +0100
1ff636
Subject: [PATCH] console-getty.service: don't start when /dev/console is
1ff636
 missing
1ff636
1ff636
Create minimal image which runs systemd
1ff636
1ff636
   FROM rhel7.1
1ff636
   RUN yum install -y /usr/bin/ps
1ff636
   ENV container docker
1ff636
   CMD [ "/usr/sbin/init" ]
1ff636
1ff636
When you run the container without -t, the process
1ff636
1ff636
   /sbin/agetty --noclear --keep-baud console 115200 38400 9600
1ff636
1ff636
is not happy and checking the journal in the container, there is a stream of
1ff636
1ff636
Mar 13 04:50:15 11bf07f59fff agetty[66]: /dev/console: No such file or directory
1ff636
Mar 13 04:50:25 11bf07f59fff systemd[1]: console-getty.service holdoff time over, scheduling restart.
1ff636
Mar 13 04:50:25 11bf07f59fff systemd[1]: Stopping Console Getty...
1ff636
Mar 13 04:50:25 11bf07f59fff systemd[1]: Starting Console Getty...
1ff636
Mar 13 04:50:25 11bf07f59fff systemd[1]: Started Console Getty.
1ff636
Mar 13 04:50:25 11bf07f59fff agetty[67]: /dev/console: No such file or directory
1ff636
Mar 13 04:50:35 11bf07f59fff systemd[1]: console-getty.service holdoff time over, scheduling restart.
1ff636
Mar 13 04:50:35 11bf07f59fff systemd[1]: Stopping Console Getty...
1ff636
Mar 13 04:50:35 11bf07f59fff systemd[1]: Starting Console Getty...
1ff636
Mar 13 04:50:35 11bf07f59fff systemd[1]: Started Console Getty.
1ff636
Mar 13 04:50:35 11bf07f59fff agetty[74]: /dev/console: No such file or directory
1ff636
Mar 13 04:50:45 11bf07f59fff systemd[1]: console-getty.service holdoff time over, scheduling restart.
1ff636
Mar 13 04:50:45 11bf07f59fff systemd[1]: Stopping Console Getty...
1ff636
Mar 13 04:50:45 11bf07f59fff systemd[1]: Starting Console Getty...
1ff636
1ff636
(cherry picked from commit 1b41981d9a62443d566df6bcabc1b5024e9f5e4a)
1ff636
1ff636
Cherry-picked from: 77d83ce
1ff636
Resolves: #1222517
1ff636
---
1ff636
 units/console-getty.service.m4.in | 1 +
1ff636
 1 file changed, 1 insertion(+)
1ff636
1ff636
diff --git a/units/console-getty.service.m4.in b/units/console-getty.service.m4.in
181b3f
index 8ac51a471..413d94094 100644
1ff636
--- a/units/console-getty.service.m4.in
1ff636
+++ b/units/console-getty.service.m4.in
1ff636
@@ -9,6 +9,7 @@
1ff636
 Description=Console Getty
1ff636
 Documentation=man:agetty(8)
1ff636
 After=systemd-user-sessions.service plymouth-quit-wait.service
1ff636
+ConditionPathExists=/dev/console
1ff636
 m4_ifdef(`HAVE_SYSV_COMPAT',
1ff636
 After=rc-local.service
1ff636
 )m4_dnl