chiark / gitweb /
service: optionally, create INIT_PROCESS/DEAD_PROCESS entries for a service
[elogind.git] / units / getty@.service.m4
1 #  This file is part of systemd.
2 #
3 #  systemd is free software; you can redistribute it and/or modify it
4 #  under the terms of the GNU General Public License as published by
5 #  the Free Software Foundation; either version 2 of the License, or
6 #  (at your option) any later version.
7
8 m4_ifdef(`TARGET_FEDORA', `m4_define(`GETTY', `/sbin/mingetty')')m4_dnl
9 m4_ifdef(`TARGET_SUSE', `m4_define(`GETTY', `/sbin/mingetty')')m4_dnl
10 m4_ifdef(`TARGET_DEBIAN', `m4_define(`GETTY', `/sbin/getty 38400')')m4_dnl
11 m4_ifdef(`TARGET_GENTOO', `m4_define(`GETTY', `/sbin/agetty 38400')')m4_dnl
12 m4_ifdef(`TARGET_ARCH', `m4_define(`GETTY', `/sbin/agetty -8 38400')')m4_dnl
13 m4_dnl
14 [Unit]
15 Description=Getty on %I
16 Requires=dev-%i.device
17 After=dev-%i.device
18 m4_ifdef(`TARGET_FEDORA',
19 After=rc-local.service
20 )m4_dnl
21 m4_ifdef(`TARGET_ARCH',
22 After=rc-local.service
23 )m4_dnl
24
25 # If additional gettys are spawned during boot (possibly by
26 # systemd-auto-console-getty) then we should make sure that this is
27 # synchronized before getty.target, even though getty.target didn't
28 # actually pull it in.
29 Before=getty.target
30
31 [Service]
32 Environment=TERM=linux
33 ExecStart=-GETTY %I
34 Restart=always
35 RestartSec=0
36 UtmpIdentifier=%I
37 KillMode=process-group
38
39 # Some login implementations ignore SIGTERM, so we send SIGHUP
40 # instead, to ensure that login terminates cleanly.
41 KillSignal=SIGHUP
42
43 [Install]
44 Alias=getty.target.wants/getty@tty1.service getty.target.wants/getty@tty2.service getty.target.wants/getty@tty3.service getty.target.wants/getty@tty4.service getty.target.wants/getty@tty5.service getty.target.wants/getty@tty6.service