2017-11-19 00:35:03 +08:00
|
|
|
# SPDX-License-Identifier: LGPL-2.1+
|
|
|
|
#
|
2010-05-17 07:34:36 +08:00
|
|
|
# This file is part of systemd.
|
|
|
|
#
|
|
|
|
# systemd is free software; you can redistribute it and/or modify it
|
2012-04-12 06:20:58 +08: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-17 07:34:36 +08:00
|
|
|
# (at your option) any later version.
|
|
|
|
|
|
|
|
[Unit]
|
|
|
|
Description=Getty on %I
|
2012-11-21 03:09:38 +08:00
|
|
|
Documentation=man:agetty(8) man:systemd-getty-generator(8)
|
|
|
|
Documentation=http://0pointer.de/blog/projects/serial-console.html
|
2017-08-31 17:20:14 +08:00
|
|
|
After=systemd-user-sessions.service plymouth-quit-wait.service getty-pre.target
|
2013-01-05 05:36:48 +08:00
|
|
|
m4_ifdef(`HAVE_SYSV_COMPAT',
|
2011-10-29 01:16:33 +08:00
|
|
|
After=rc-local.service
|
|
|
|
)m4_dnl
|
2010-05-17 07:34:36 +08:00
|
|
|
|
2010-10-09 00:22:44 +08: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-19 05:10:27 +08:00
|
|
|
Before=getty.target
|
2012-04-12 03:58:33 +08:00
|
|
|
IgnoreOnIsolate=yes
|
2010-08-19 05:10:27 +08:00
|
|
|
|
2016-07-25 22:18:00 +08:00
|
|
|
# IgnoreOnIsolate causes issues with sulogin, if someone isolates
|
|
|
|
# rescue.target or starts rescue.service from multi-user.target or
|
|
|
|
# graphical.target.
|
2017-09-27 01:47:50 +08:00
|
|
|
Conflicts=rescue.service
|
|
|
|
Before=rescue.service
|
2016-07-25 22:18:00 +08:00
|
|
|
|
2013-07-13 21:59:35 +08:00
|
|
|
# On systems without virtual consoles, don't start any getty. Note
|
2012-04-12 23:31:26 +08:00
|
|
|
# that serial gettys are covered by serial-getty@.service, not this
|
2013-07-13 21:59:35 +08:00
|
|
|
# unit.
|
2012-04-12 23:31:26 +08:00
|
|
|
ConditionPathExists=/dev/tty0
|
|
|
|
|
2010-05-17 07:34:36 +08:00
|
|
|
[Service]
|
2012-06-06 17:26:30 +08:00
|
|
|
# the VT is cleared by TTYVTDisallocate
|
2017-05-24 19:58:01 +08: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.
|
|
|
|
ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear %I $TERM
|
2012-04-24 20:28:00 +08:00
|
|
|
Type=idle
|
2010-10-06 02:30:44 +08:00
|
|
|
Restart=always
|
2010-05-18 09:08:18 +08:00
|
|
|
RestartSec=0
|
2010-10-08 22:06:23 +08:00
|
|
|
UtmpIdentifier=%I
|
2011-05-18 07:07:31 +08:00
|
|
|
TTYPath=/dev/%I
|
|
|
|
TTYReset=yes
|
|
|
|
TTYVHangup=yes
|
|
|
|
TTYVTDisallocate=yes
|
2020-05-26 20:12:56 +08:00
|
|
|
m4_ifdef(`ENABLE_LOGIND',,
|
2011-03-30 05:31:38 +08:00
|
|
|
KillMode=process
|
2020-05-26 20:12:56 +08:00
|
|
|
)m4_dnl
|
2012-02-09 10:18:04 +08:00
|
|
|
IgnoreSIGPIPE=no
|
2013-07-30 07:54:59 +08:00
|
|
|
SendSIGHUP=yes
|
2010-08-06 02:29:11 +08:00
|
|
|
|
2011-01-07 03:38:06 +08:00
|
|
|
# Unset locale for the console getty since the console has problems
|
|
|
|
# displaying some internationalized messages.
|
2017-09-10 18:19:02 +08: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-07 03:38:06 +08:00
|
|
|
|
2010-06-19 03:56:21 +08:00
|
|
|
[Install]
|
2013-07-13 21:59:35 +08:00
|
|
|
WantedBy=getty.target
|
2014-06-17 06:15:31 +08:00
|
|
|
DefaultInstance=tty1
|