summaryrefslogtreecommitdiffstats
path: root/core/modules/systemd/data/usr/lib/systemd/system/console-getty.service
diff options
context:
space:
mode:
Diffstat (limited to 'core/modules/systemd/data/usr/lib/systemd/system/console-getty.service')
-rw-r--r--core/modules/systemd/data/usr/lib/systemd/system/console-getty.service11
1 files changed, 6 insertions, 5 deletions
diff --git a/core/modules/systemd/data/usr/lib/systemd/system/console-getty.service b/core/modules/systemd/data/usr/lib/systemd/system/console-getty.service
index 74a220e2..5c9c01c7 100644
--- a/core/modules/systemd/data/usr/lib/systemd/system/console-getty.service
+++ b/core/modules/systemd/data/usr/lib/systemd/system/console-getty.service
@@ -9,11 +9,15 @@
Description=Console Getty
Documentation=man:agetty(8)
After=systemd-user-sessions.service plymouth-quit-wait.service
+ConditionPathExists=/dev/console
After=rc-local.service
Before=getty.target
[Service]
-ExecStart=-/sbin/agetty --noclear -s console 115200,38400,9600
+# The '-o' option value tells agetty to replace 'login' arguments with an
+# option to preserve environment (-p), followed by '--' for safety, and then
+# the entered username.
+ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear --keep-baud console 115200,38400,9600 $TERM
Type=idle
Restart=always
RestartSec=0
@@ -23,10 +27,7 @@ TTYReset=yes
TTYVHangup=yes
KillMode=process
IgnoreSIGPIPE=no
-
-# Bash ignores SIGTERM, so we send SIGHUP instead, to ensure that bash
-# terminates cleanly.
-KillSignal=SIGHUP
+SendSIGHUP=yes
[Install]
WantedBy=getty.target