]> git.ipfire.org Git - thirdparty/systemd.git/blame - units/getty@.service.m4
test: Disable LUKS devices from initramfs in QEMU tests
[thirdparty/systemd.git] / units / getty@.service.m4
CommitLineData
a7df2d1e
ZJS
1# SPDX-License-Identifier: LGPL-2.1+
2#
5e6afdd3
LP
3# This file is part of systemd.
4#
5e6afdd3 5# systemd is free software; you can redistribute it and/or modify it
5430f7f2
LP
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
5e6afdd3 8# (at your option) any later version.
5e6afdd3 9
5e6afdd3
LP
10[Unit]
11Description=Getty on %I
00addadd
LP
12Documentation=man:agetty(8) man:systemd-getty-generator(8)
13Documentation=http://0pointer.de/blog/projects/serial-console.html
17590254 14After=systemd-user-sessions.service plymouth-quit-wait.service getty-pre.target
83514a2f 15m4_ifdef(`HAVE_SYSV_COMPAT',
6fdae8a6
DM
16After=rc-local.service
17)m4_dnl
5e6afdd3 18
c84ed68f
LP
19# If additional gettys are spawned during boot then we should make
20# sure that this is synchronized before getty.target, even though
21# getty.target didn't actually pull it in.
9f24a810 22Before=getty.target
4771148b 23IgnoreOnIsolate=yes
9f24a810 24
5ed020d8
MS
25# IgnoreOnIsolate causes issues with sulogin, if someone isolates
26# rescue.target or starts rescue.service from multi-user.target or
27# graphical.target.
0d18f808
AJ
28Conflicts=rescue.service
29Before=rescue.service
5ed020d8 30
7aa4fa34 31# On systems without virtual consoles, don't start any getty. Note
8ef58b3e 32# that serial gettys are covered by serial-getty@.service, not this
7aa4fa34 33# unit.
8ef58b3e
LP
34ConditionPathExists=/dev/tty0
35
5e6afdd3 36[Service]
3305d680 37# the VT is cleared by TTYVTDisallocate
db6aedab
NK
38# The '-o' option value tells agetty to replace 'login' arguments with an
39# option to preserve environment (-p), followed by '--' for safety, and then
40# the entered username.
41ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear %I $TERM
f2b68789 42Type=idle
525ee6f4 43Restart=always
1e3fc654 44RestartSec=0
169c1bda 45UtmpIdentifier=%I
6ea832a2
LP
46TTYPath=/dev/%I
47TTYReset=yes
48TTYVHangup=yes
49TTYVTDisallocate=yes
cd25cce9 50KillMode=process
353e12c2 51IgnoreSIGPIPE=no
82659fd7 52SendSIGHUP=yes
30609d9c 53
1640944a
LP
54# Unset locale for the console getty since the console has problems
55# displaying some internationalized messages.
82f93439 56UnsetEnvironment=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
1640944a 57
3d88bf66 58[Install]
7aa4fa34 59WantedBy=getty.target
d54c4993 60DefaultInstance=tty1