]> git.ipfire.org Git - thirdparty/systemd.git/blame - units/console-getty.service.in
Merge pull request #32957 from mrc0mmand/fix-coverage-builds
[thirdparty/systemd.git] / units / console-getty.service.in
CommitLineData
db9ecf05 1# SPDX-License-Identifier: LGPL-2.1-or-later
a7df2d1e 2#
337eebb9
LP
3# This file is part of systemd.
4#
5# systemd is free software; you can redistribute it and/or modify it
6# under the terms of the GNU Lesser General Public License as published by
7# the Free Software Foundation; either version 2.1 of the License, or
8# (at your option) any later version.
9
10[Unit]
11Description=Console Getty
8522ee79 12Documentation=man:agetty(8) man:systemd-getty-generator(8)
ce0fe01f 13After=systemd-user-sessions.service plymouth-quit-wait.service getty-pre.target
059cc610 14{% if HAVE_SYSV_COMPAT %}
ce0fe01f 15After=rc-local.service
059cc610 16{% endif %}
337eebb9
LP
17Before=getty.target
18
858beb39
AJ
19# OCI containers may be run without a console
20ConditionPathExists=/dev/console
21
337eebb9 22[Service]
219fa78b
DDM
23# The '-o' option value tells agetty to replace 'login' arguments with an option to preserve environment (-p),
24# followed by '--' for safety, and then the entered username.
b4bf9007 25ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear --keep-baud - 115200,38400,9600 $TERM
f2b68789 26Type=idle
337eebb9 27Restart=always
337eebb9 28UtmpIdentifier=cons
b4bf9007
DDM
29StandardInput=tty
30StandardOutput=tty
337eebb9
LP
31TTYPath=/dev/console
32TTYReset=yes
33TTYVHangup=yes
059cc610 34{% if not ENABLE_LOGIND %}
337eebb9 35KillMode=process
059cc610 36{% endif %}
337eebb9 37IgnoreSIGPIPE=no
82659fd7 38SendSIGHUP=yes
9e72aa18
DDM
39ImportCredential=agetty.*
40ImportCredential=login.*
337eebb9
LP
41
42[Install]
43WantedBy=getty.target