2020-11-09 04:23:58 +00:00
|
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
2017-11-18 16:35:03 +00:00
|
|
|
#
|
2010-05-16 23:34:36 +00:00
|
|
|
# This file is part of systemd.
|
|
|
|
#
|
|
|
|
# systemd is free software; you can redistribute it and/or modify it
|
2012-04-11 22:20:58 +00:00
|
|
|
# under the terms of the GNU Lesser General Public License as published by
|
|
|
|
# the Free Software Foundation; either version 2.1 of the License, or
|
2010-05-16 23:34:36 +00:00
|
|
|
# (at your option) any later version.
|
|
|
|
|
|
|
|
[Unit]
|
|
|
|
Description=Getty on %I
|
2012-11-20 19:09:38 +00:00
|
|
|
Documentation=man:agetty(8) man:systemd-getty-generator(8)
|
2023-06-23 11:08:57 +00:00
|
|
|
Documentation=https://0pointer.de/blog/projects/serial-console.html
|
2017-08-31 09:20:14 +00:00
|
|
|
After=systemd-user-sessions.service plymouth-quit-wait.service getty-pre.target
|
2021-05-16 09:55:36 +00:00
|
|
|
{% if HAVE_SYSV_COMPAT %}
|
2011-10-28 17:16:33 +00:00
|
|
|
After=rc-local.service
|
2021-05-16 09:55:36 +00:00
|
|
|
{% endif %}
|
2010-05-16 23:34:36 +00:00
|
|
|
|
2010-10-08 16:22:44 +00:00
|
|
|
# If additional gettys are spawned during boot then we should make
|
|
|
|
# sure that this is synchronized before getty.target, even though
|
|
|
|
# getty.target didn't actually pull it in.
|
2010-08-18 21:10:27 +00:00
|
|
|
Before=getty.target
|
2012-04-11 19:58:33 +00:00
|
|
|
IgnoreOnIsolate=yes
|
2010-08-18 21:10:27 +00:00
|
|
|
|
2016-07-25 14:18:00 +00:00
|
|
|
# IgnoreOnIsolate causes issues with sulogin, if someone isolates
|
|
|
|
# rescue.target or starts rescue.service from multi-user.target or
|
|
|
|
# graphical.target.
|
2017-09-26 17:47:50 +00:00
|
|
|
Conflicts=rescue.service
|
|
|
|
Before=rescue.service
|
2016-07-25 14:18:00 +00:00
|
|
|
|
2013-07-13 13:59:35 +00:00
|
|
|
# On systems without virtual consoles, don't start any getty. Note
|
2012-04-12 15:31:26 +00:00
|
|
|
# that serial gettys are covered by serial-getty@.service, not this
|
2013-07-13 13:59:35 +00:00
|
|
|
# unit.
|
2012-04-12 15:31:26 +00:00
|
|
|
ConditionPathExists=/dev/tty0
|
|
|
|
|
2010-05-16 23:34:36 +00:00
|
|
|
[Service]
|
2012-06-06 09:26:30 +00:00
|
|
|
# the VT is cleared by TTYVTDisallocate
|
2017-05-24 11:58:01 +00:00
|
|
|
# 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.
|
2021-10-29 12:54:31 +00:00
|
|
|
ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear - $TERM
|
2012-04-24 12:28:00 +00:00
|
|
|
Type=idle
|
2010-10-05 18:30:44 +00:00
|
|
|
Restart=always
|
2010-05-18 01:08:18 +00:00
|
|
|
RestartSec=0
|
2010-10-08 14:06:23 +00:00
|
|
|
UtmpIdentifier=%I
|
2021-10-29 12:54:31 +00:00
|
|
|
StandardInput=tty
|
|
|
|
StandardOutput=tty
|
2011-05-17 23:07:31 +00:00
|
|
|
TTYPath=/dev/%I
|
|
|
|
TTYReset=yes
|
|
|
|
TTYVHangup=yes
|
|
|
|
TTYVTDisallocate=yes
|
2021-05-16 09:55:36 +00:00
|
|
|
{% if not ENABLE_LOGIND %}
|
2011-03-29 21:31:38 +00:00
|
|
|
KillMode=process
|
2021-05-16 09:55:36 +00:00
|
|
|
{% endif %}
|
2012-02-09 02:18:04 +00:00
|
|
|
IgnoreSIGPIPE=no
|
2013-07-29 23:54:59 +00:00
|
|
|
SendSIGHUP=yes
|
2023-07-27 14:50:58 +00:00
|
|
|
ImportCredential=agetty.*
|
|
|
|
ImportCredential=login.*
|
2010-08-05 18:29:11 +00:00
|
|
|
|
2011-01-06 19:38:06 +00:00
|
|
|
# Unset locale for the console getty since the console has problems
|
|
|
|
# displaying some internationalized messages.
|
2017-09-10 10:19:02 +00:00
|
|
|
UnsetEnvironment=LANG LANGUAGE LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION
|
2011-01-06 19:38:06 +00:00
|
|
|
|
2010-06-18 19:56:21 +00:00
|
|
|
[Install]
|
2013-07-13 13:59:35 +00:00
|
|
|
WantedBy=getty.target
|
2014-06-16 22:15:31 +00:00
|
|
|
DefaultInstance=tty1
|