chiark / gitweb /
units/serial-getty@.service: use the default RestartSec
authorMichael Olbrich <m.olbrich@pengutronix.de>
Tue, 15 Jul 2014 16:28:10 +0000 (18:28 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 16 Jul 2014 03:51:10 +0000 (23:51 -0400)
For pluggable ttys such as USB serial devices, the getty is restarted
and exits in a loop until the remove event reaches systemd. Under
certain circumstances the restart loop can overload the system in a
way that prevents the remove event from reaching systemd for a long
time (e.g. at least several minutes on a small embedded system).

Use the default RestartSec to prevent the restart loop from
overloading the system. Serial gettys are interactive units, so
waiting an extra 100ms really doesn't make a difference anyways
compared to the time it takes the user to log in.

units/serial-getty@.service.m4

index 4ac51e768db3bebb83e022a96c354122b1d749a4..4522d0d2be30d499194f5e3006be92d134141f87 100644 (file)
@@ -25,7 +25,6 @@ IgnoreOnIsolate=yes
 ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM
 Type=idle
 Restart=always
 ExecStart=-/sbin/agetty --keep-baud 115200,38400,9600 %I $TERM
 Type=idle
 Restart=always
-RestartSec=0
 UtmpIdentifier=%I
 TTYPath=/dev/%I
 TTYReset=yes
 UtmpIdentifier=%I
 TTYPath=/dev/%I
 TTYReset=yes