dcavalca / rpms / systemd

Forked from rpms/systemd 3 months ago
Clone
Blob Blame History Raw
From fa600b8b075ad4c717bd5f60fd3c6b5545cc75c5 Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 18 Dec 2013 17:48:31 +0100
Subject: [PATCH] units: when spawning a getty configure TERM explicitly

This way we can make use of our logic to automatically determine an
appropriate TERM for a specific tty.

Conflicts:
	units/console-getty.service.m4.in
	units/container-getty@.service.m4.in

(cherry picked from commit ccf22d4a104e6ed2666d6c5b4031981a84787790)

Related: #1075729
---
 units/console-getty.service.m4.in | 2 +-
 units/getty@.service.m4           | 2 +-
 units/serial-getty@.service.m4    | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/units/console-getty.service.m4.in b/units/console-getty.service.m4.in
index 2fd9dd8..8ac51a4 100644
--- a/units/console-getty.service.m4.in
+++ b/units/console-getty.service.m4.in
@@ -15,7 +15,7 @@ After=rc-local.service
 Before=getty.target
 
 [Service]
-ExecStart=-/sbin/agetty --noclear -s console 115200,38400,9600
+ExecStart=-/sbin/agetty --noclear --keep-baud console 115200,38400,9600 $TERM
 Type=idle
 Restart=always
 RestartSec=0
diff --git a/units/getty@.service.m4 b/units/getty@.service.m4
index 253da85..aa853b8 100644
--- a/units/getty@.service.m4
+++ b/units/getty@.service.m4
@@ -27,7 +27,7 @@ ConditionPathExists=/dev/tty0
 
 [Service]
 # the VT is cleared by TTYVTDisallocate
-ExecStart=-/sbin/agetty --noclear %I
+ExecStart=-/sbin/agetty --noclear %I $TERM
 Type=idle
 Restart=always
 RestartSec=0
diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4
index aea078f..e94cdb4 100644
--- a/units/serial-getty@.service.m4
+++ b/units/serial-getty@.service.m4
@@ -22,7 +22,7 @@ Before=getty.target
 IgnoreOnIsolate=yes
 
 [Service]
-ExecStart=-/sbin/agetty --keep-baud %I 115200,38400,9600
+ExecStart=-/sbin/agetty --keep-baud %I 115200,38400,9600 $TERM
 Type=idle
 Restart=always
 RestartSec=0