summaryrefslogtreecommitdiff
path: root/units
diff options
context:
space:
mode:
Diffstat (limited to 'units')
-rw-r--r--units/.gitignore1
-rw-r--r--units/getty@.service.m42
-rw-r--r--units/serial-getty@.service.m437
-rw-r--r--units/systemd-auto-serial-getty.service (renamed from units/systemd-auto-console-getty.service.in)4
4 files changed, 41 insertions, 3 deletions
diff --git a/units/.gitignore b/units/.gitignore
index 82a24170cf..35f790849e 100644
--- a/units/.gitignore
+++ b/units/.gitignore
@@ -1,3 +1,4 @@
+serial-getty@.service
systemd-kmsg-syslogd.service
systemd-modules-load.service
systemd-remount-api-vfs.service
diff --git a/units/getty@.service.m4 b/units/getty@.service.m4
index 01343c497f..4b65d5b906 100644
--- a/units/getty@.service.m4
+++ b/units/getty@.service.m4
@@ -30,7 +30,7 @@ Before=getty.target
[Service]
Environment=TERM=linux
-ExecStart=GETTY %I
+ExecStart=-GETTY %I
Restart=restart-always
RestartSec=0
KillMode=process-group
diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4
new file mode 100644
index 0000000000..b91ed98330
--- /dev/null
+++ b/units/serial-getty@.service.m4
@@ -0,0 +1,37 @@
+# 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.
+
+[Unit]
+Description=Serial Getty on %I
+Requires=dev-%i.device
+After=dev-%i.device
+m4_ifdef(`TARGET_FEDORA',
+After=rc-local.service
+)m4_dnl
+m4_ifdef(`TARGET_ARCH',
+After=rc-local.service
+)m4_dnl
+
+# If additional gettys are spawned during boot (possibly by
+# systemd-auto-console-getty) then we should make sure that this is
+# synchronized before getty.target, even though getty.target didn't
+# actually pull it in.
+Before=getty.target
+
+[Service]
+Environment=TERM=vt100-nav
+m4_ifdef(`TARGET_FEDORA',
+ExecStartPre=-/sbin/securetty %I
+)m4_dnl
+ExecStart=-/sbin/agetty -s %I 115200,38400,9600
+Restart=restart-always
+RestartSec=0
+KillMode=process-group
+
+# Some login implementations ignore SIGTERM, so we send SIGHUP
+# instead, to ensure that login terminates cleanly.
+KillSignal=SIGHUP
diff --git a/units/systemd-auto-console-getty.service.in b/units/systemd-auto-serial-getty.service
index 6542cab18a..8051c7446a 100644
--- a/units/systemd-auto-console-getty.service.in
+++ b/units/systemd-auto-serial-getty.service
@@ -6,11 +6,11 @@
# (at your option) any later version.
[Unit]
-Description=Automatically Spawn getty on Kernel Console
+Description=Automatically Spawn getty on Serial Kernel Console
[Service]
Type=oneshot
-ExecStart=@rootlibexecdir@/systemd-auto-console-getty
+ExecStart=@rootlibexecdir@/systemd-auto-serial-getty
[Install]
WantedBy=getty.target