2020-11-09 13:23:58 +09:00
# SPDX-License-Identifier: LGPL-2.1-or-later
2017-11-18 17:35:03 +01:00
#
2010-08-25 03:09:57 +02:00
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
2012-04-12 00:20:58 +02:00
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
2010-08-25 03:09:57 +02:00
# (at your option) any later version.
[Unit]
Description = Serial Getty on %I
2012-06-27 15:12:29 +02:00
Documentation = man:agetty(8) man:systemd-getty-generator(8)
2023-06-23 13:08:57 +02:00
Documentation = https://0pointer.de/blog/projects/serial-console.html
2012-07-13 23:34:40 +02:00
BindsTo = dev-%i.device
2017-08-31 11:20:14 +02:00
After = dev-%i.device systemd-user-sessions.service plymouth-quit-wait.service getty-pre.target
2021-05-16 11:55:36 +02:00
{ % i f H A V E _ S Y S V _ C O M P A T % }
2011-10-28 19:16:33 +02:00
After = rc-local.service
2021-05-16 11:55:36 +02:00
{ % e n d i f % }
2010-08-25 03:09:57 +02:00
2010-10-08 18:22:44 +02:00
# If additional gettys are spawned during boot then we should make
# sure that this is synchronized before getty.target, even though
# getty.target didn't actually pull it in.
2010-08-25 03:09:57 +02:00
Before = getty.target
2012-04-11 21:58:33 +02:00
IgnoreOnIsolate = yes
2010-08-25 03:09:57 +02:00
2017-03-30 10:39:16 +02:00
# IgnoreOnIsolate causes issues with sulogin, if someone isolates
# rescue.target or starts rescue.service from multi-user.target or
# graphical.target.
2017-09-26 18:47:50 +01:00
Conflicts = rescue.service
Before = rescue.service
2017-03-30 10:39:16 +02:00
2010-08-25 03:09:57 +02:00
[Service]
2024-08-14 11:42:03 -07:00
# The '-o' option value tells agetty to replace 'login' arguments with '--' for
# safety, and then the entered username.
ExecStart = -/sbin/agetty -o '-- \\u' --noreset --noclear --keep-baud 115200,57600,38400,9600 - ${TERM}
2012-04-24 14:28:00 +02:00
Type = idle
2010-10-05 20:30:44 +02:00
Restart = always
2010-10-08 18:22:44 +02:00
UtmpIdentifier = %I
2021-10-29 13:54:31 +01:00
StandardInput = tty
StandardOutput = tty
2011-05-18 01:07:31 +02:00
TTYPath = /dev/%I
TTYReset = yes
TTYVHangup = yes
2021-05-16 11:55:36 +02:00
{ % i f n o t E N A B L E _ L O G I N D % }
2011-03-29 23:31:38 +02:00
KillMode = process
2021-05-16 11:55:36 +02:00
{ % e n d i f % }
2012-02-09 03:18:04 +01:00
IgnoreSIGPIPE = no
2013-07-30 01:54:59 +02:00
SendSIGHUP = yes
2024-07-30 16:22:34 +02:00
ImportCredential = tty.serial.%I.agetty.*:agetty.
ImportCredential = tty.serial.%I.login.*:login.
2023-07-27 16:50:58 +02:00
ImportCredential = agetty.*
ImportCredential = login.*
2014-02-24 08:02:28 -05:00
[Install]
WantedBy = getty.target