|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
From 89b958ef6a43400d1f7b25c58b02f4b5c3c59b36 Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
From: Michael Olbrich <m.olbrich@pengutronix.de>
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
Date: Tue, 15 Jul 2014 18:28:10 +0200
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
Subject: [PATCH] units/serial-getty@.service: use the default RestartSec
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
For pluggable ttys such as USB serial devices, the getty is restarted
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
and exits in a loop until the remove event reaches systemd. Under
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
certain circumstances the restart loop can overload the system in a
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
way that prevents the remove event from reaching systemd for a long
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
time (e.g. at least several minutes on a small embedded system).
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
Use the default RestartSec to prevent the restart loop from
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
overloading the system. Serial gettys are interactive units, so
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
waiting an extra 100ms really doesn't make a difference anyways
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
compared to the time it takes the user to log in.
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
(cherry picked from commit 4bf04322b8b7ecca4f3d65cfc642d0ac16356129)
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
units/serial-getty@.service.m4 | 1 -
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
1 file changed, 1 deletion(-)
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
index 4ac51e768d..4522d0d2be 100644
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
--- a/units/serial-getty@.service.m4
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
+++ b/units/serial-getty@.service.m4
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
@@ -25,7 +25,6 @@ IgnoreOnIsolate=yes
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
Type=idle
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
Restart=always
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
-RestartSec=0
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
UtmpIdentifier=%I
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
TTYPath=/dev/%I
|
|
Zbigniew Jędrzejewski-Szmek |
43ff24 |
TTYReset=yes
|