Add getty@.service replacement
authorDavid Herrmann <dh.herrmann@googlemail.com>
Sun, 9 Dec 2012 17:40:26 +0000 (18:40 +0100)
committerDavid Herrmann <dh.herrmann@googlemail.com>
Sun, 9 Dec 2012 17:40:26 +0000 (18:40 +0100)
This unit file is a new replacement for standard systemd-getty files.
Installed into /etc/systemd/system it replaces the standard systemd unit
and spawns kmscon instead of agetty on virtual terminals.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
docs/getty@.service [new file with mode: 0644]

diff --git a/docs/getty@.service b/docs/getty@.service
new file mode 100644 (file)
index 0000000..7699932
--- /dev/null
@@ -0,0 +1,45 @@
+#
+# Kmscon getty replacement
+# Systemd uses a unit called getty@.service to spawn gettys on virtual
+# terminals. This unit can be used as drop-in replacement to spawn kmscon
+# instead of agetty on VTs.
+# Please report inconsistencies and problems with this unit to the kmscon
+# developers and not to the systemd developers.
+#
+# This unit makes systemd-logind run kmscon in default-mode on each virtual
+# terminal that it allocates. Use /etc/kmscon/kmscon.conf to modify the runtime
+# options for kmscon. You can use "-c /etc/some/path" to change the
+# configuration directory for this kmscon process.
+#
+# This unit takes a VT name as argument. So use getty@tty4.service to run this
+# on /dev/tty4 (which is VT number 4). This is always limited to seat0. If you
+# want to run kmscon on other seats, use the default service files provided by
+# kmscon.
+#
+
+[Unit]
+Description=Kmscon-Getty on %I
+Documentation=man:kmscon(1)
+Documentation=man:agetty(8) man:systemd-getty-generator(8)
+Documentation=http://0pointer.de/blog/projects/serial-console.html
+After=systemd-user-sessions.service
+After=plymouth-quit-wait.service
+Before=getty.target
+IgnoreOnIsolate=yes
+
+# On systems without virtual consoles, don't start any getty. (Note
+# that serial gettys are covered by serial-getty@.service, not this
+# unit)
+ConditionPathExists=/dev/tty0
+
+[Service]
+ExecStart=/usr/bin/kmscon --vt=%I --seats=seat0 --no-switchvt
+Restart=always
+UtmpIdentifier=%I
+TTYPath=/dev/%I
+TTYReset=yes
+TTYVHangup=yes
+TTYVTDisallocate=yes
+
+[Install]
+Alias=getty.target.wants/getty@tty1.service