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