chiark / gitweb /
units: make sure container-getty@.service stops restarting when the pts device it...
authorLennart Poettering <lennart@poettering.net>
Tue, 9 Dec 2014 01:12:11 +0000 (02:12 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 9 Dec 2014 01:12:11 +0000 (02:12 +0100)
We only want to restart the getty as long as the pts device is still
around. As soon as it is gone, the service should be removed to.

http://lists.freedesktop.org/archives/systemd-devel/2014-December/026048.html

units/container-getty@.service.m4.in

index 4f7794b5026fa2b1b2ab4ada5f09ca5338a16d35..512046692915c9a957cfdcf7f804360905fb851b 100644 (file)
@@ -14,6 +14,7 @@ After=rc-local.service
 )m4_dnl
 Before=getty.target
 IgnoreOnIsolate=yes
 )m4_dnl
 Before=getty.target
 IgnoreOnIsolate=yes
+ConditionPathExists=/dev/pts/%I
 
 [Service]
 ExecStart=-/sbin/agetty --noclear --keep-baud pts/%I 115200,38400,9600 $TERM
 
 [Service]
 ExecStart=-/sbin/agetty --noclear --keep-baud pts/%I 115200,38400,9600 $TERM