dcavalca / rpms / systemd

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