2010-08-25 05:09:57 +04:00
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
2010-11-11 02:30:00 +03:00
m4_ifdef(`TARGET_FEDORA', `m4_define(`GETTY', `/sbin/agetty')')m4_dnl
m4_ifdef(`TARGET_SUSE', `m4_define(`GETTY', `/sbin/agetty')')m4_dnl
m4_ifdef(`TARGET_GENTOO', `m4_define(`GETTY', `/sbin/agetty')')m4_dnl
m4_ifdef(`TARGET_ARCH', `m4_define(`GETTY', `/sbin/agetty')')m4_dnl
m4_ifdef(`TARGET_DEBIAN', `m4_define(`GETTY', `/sbin/getty')')m4_dnl
m4_ifdef(`TARGET_UBUNTU', `m4_define(`GETTY', `/sbin/getty')')m4_dnl
m4_dnl
2010-08-25 05:09:57 +04:00
[Unit]
Description=Serial Getty on %I
2010-10-29 01:18:47 +04:00
BindTo=dev-%i.device
2010-08-25 05:09:57 +04:00
After=dev-%i.device
m4_ifdef(`TARGET_FEDORA',
After=rc-local.service
)m4_dnl
m4_ifdef(`TARGET_ARCH',
After=rc-local.service
)m4_dnl
2010-10-08 20:22:44 +04: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 05:09:57 +04:00
Before=getty.target
[Service]
Environment=TERM=vt100-nav
m4_ifdef(`TARGET_FEDORA',
ExecStartPre=-/sbin/securetty %I
)m4_dnl
2010-11-11 02:30:00 +03:00
ExecStart=-GETTY -s %I 115200,38400,9600
2010-10-05 22:30:44 +04:00
Restart=always
2010-08-25 05:09:57 +04:00
RestartSec=0
2010-10-08 20:22:44 +04:00
UtmpIdentifier=%I
2010-08-25 05:09:57 +04:00
KillMode=process-group
# Some login implementations ignore SIGTERM, so we send SIGHUP
# instead, to ensure that login terminates cleanly.
KillSignal=SIGHUP