From 6ea832a20700f5282c08c70f38422c6ab290a0b5 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 18 May 2011 01:07:31 +0200 Subject: exec: hangup/reset/deallocate VTs in gettys Explicitly disconnect all clients from a VT when a getty starts/finishes (requires TIOCVHANGUP, available in 2.6.29). Explicitly deallocate getty VTs in order to flush scrollback buffer. Explicitly reset terminals to a defined state before spawning getty. --- units/getty@.service.m4 | 4 ++++ units/serial-getty@.service.m4 | 3 +++ 2 files changed, 7 insertions(+) (limited to 'units') diff --git a/units/getty@.service.m4 b/units/getty@.service.m4 index a9733a60d6..bfceb39fde 100644 --- a/units/getty@.service.m4 +++ b/units/getty@.service.m4 @@ -36,6 +36,10 @@ ExecStart=-/sbin/agetty %I 38400 Restart=always RestartSec=0 UtmpIdentifier=%I +TTYPath=/dev/%I +TTYReset=yes +TTYVHangup=yes +TTYVTDisallocate=yes KillMode=process # Unset locale for the console getty since the console has problems diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4 index 8b4f0fb9d5..082290cb8b 100644 --- a/units/serial-getty@.service.m4 +++ b/units/serial-getty@.service.m4 @@ -36,6 +36,9 @@ ExecStart=-/sbin/agetty -s %I 115200,38400,9600 Restart=always RestartSec=0 UtmpIdentifier=%I +TTYPath=/dev/%I +TTYReset=yes +TTYVHangup=yes KillMode=process # Some login implementations ignore SIGTERM, so we send SIGHUP -- cgit v1.2.3-54-g00ecf