]>
Commit | Line | Data |
---|---|---|
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] |
11 | Description=Getty on %I | |
00addadd LP |
12 | Documentation=man:agetty(8) man:systemd-getty-generator(8) |
13 | Documentation=http://0pointer.de/blog/projects/serial-console.html | |
17590254 | 14 | After=systemd-user-sessions.service plymouth-quit-wait.service getty-pre.target |
83514a2f | 15 | m4_ifdef(`HAVE_SYSV_COMPAT', |
6fdae8a6 DM |
16 | After=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 | 22 | Before=getty.target |
4771148b | 23 | IgnoreOnIsolate=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 |
28 | Conflicts=rescue.service |
29 | Before=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 |
34 | ConditionPathExists=/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. | |
41 | ExecStart=-/sbin/agetty -o '-p -- \\u' --noclear %I $TERM | |
f2b68789 | 42 | Type=idle |
525ee6f4 | 43 | Restart=always |
1e3fc654 | 44 | RestartSec=0 |
169c1bda | 45 | UtmpIdentifier=%I |
6ea832a2 LP |
46 | TTYPath=/dev/%I |
47 | TTYReset=yes | |
48 | TTYVHangup=yes | |
49 | TTYVTDisallocate=yes | |
021acbc1 | 50 | m4_ifdef(`ENABLE_LOGIND',, |
cd25cce9 | 51 | KillMode=process |
021acbc1 | 52 | )m4_dnl |
353e12c2 | 53 | IgnoreSIGPIPE=no |
82659fd7 | 54 | SendSIGHUP=yes |
30609d9c | 55 | |
1640944a LP |
56 | # Unset locale for the console getty since the console has problems |
57 | # displaying some internationalized messages. | |
82f93439 | 58 | 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 |
1640944a | 59 | |
3d88bf66 | 60 | [Install] |
7aa4fa34 | 61 | WantedBy=getty.target |
d54c4993 | 62 | DefaultInstance=tty1 |