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]
11Description=Serial Getty on %I
12Documentation=man:agetty(8) man:systemd-getty-generator(8)
13Documentation=http://0pointer.de/blog/projects/serial-console.html
14PartOf=dev-%i.device
15ConditionPathExists=/dev/%i
16After=dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service getty-pre.target
17After=rc-local.service
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.
22Before=getty.target
23IgnoreOnIsolate=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.
28Conflicts=rescue.service
29Before=rescue.service
30
31[Service]
32Environment="TERM=@TERM@"
33ExecStart=-/sbin/agetty -8 -L %I @BAUDRATE@ $TERM
34Type=idle
35Restart=always
36UtmpIdentifier=%I
37TTYPath=/dev/%I
38TTYReset=yes
39TTYVHangup=yes
40KillMode=process
41IgnoreSIGPIPE=no
42SendSIGHUP=yes
43
44[Install]
45WantedBy=getty.target
46