]> git.ipfire.org Git - thirdparty/systemd.git/blob - units/getty@.service.m4
travis: turn on nonnull-attribute on Fuzzit
[thirdparty/systemd.git] / units / getty@.service.m4
1 # SPDX-License-Identifier: LGPL-2.1+
2 #
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]
11 Description=Getty on %I
12 Documentation=man:agetty(8) man:systemd-getty-generator(8)
13 Documentation=http://0pointer.de/blog/projects/serial-console.html
14 After=systemd-user-sessions.service plymouth-quit-wait.service getty-pre.target
15 m4_ifdef(`HAVE_SYSV_COMPAT',
16 After=rc-local.service
17 )m4_dnl
18
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.
22 Before=getty.target
23 IgnoreOnIsolate=yes
24
25 # IgnoreOnIsolate causes issues with sulogin, if someone isolates
26 # rescue.target or starts rescue.service from multi-user.target or
27 # graphical.target.
28 Conflicts=rescue.service
29 Before=rescue.service
30
31 # On systems without virtual consoles, don't start any getty. Note
32 # that serial gettys are covered by serial-getty@.service, not this
33 # unit.
34 ConditionPathExists=/dev/tty0
35
36 [Service]
37 # the VT is cleared by TTYVTDisallocate
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.
41 ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear %I $TERM
42 Type=idle
43 Restart=always
44 RestartSec=0
45 UtmpIdentifier=%I
46 TTYPath=/dev/%I
47 TTYReset=yes
48 TTYVHangup=yes
49 TTYVTDisallocate=yes
50 KillMode=process
51 IgnoreSIGPIPE=no
52 SendSIGHUP=yes
53
54 # Unset locale for the console getty since the console has problems
55 # displaying some internationalized messages.
56 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
57
58 [Install]
59 WantedBy=getty.target
60 DefaultInstance=tty1