summaryrefslogtreecommitdiff
path: root/docs/kmsconvt@.service
diff options
context:
space:
mode:
authorDavid Herrmann <dh.herrmann@googlemail.com>2012-12-17 13:25:52 +0100
committerDavid Herrmann <dh.herrmann@googlemail.com>2012-12-17 13:25:52 +0100
commitb469a1f4eb3b01e27ed31fd381f578cd192c71af (patch)
treed945a3a3e6a8feddb81b5828ea90f76f7f81a3d6 /docs/kmsconvt@.service
parent6be24df169a7af60ed5106b1cd200d2ba7907333 (diff)
docs: add kmsconvt@.service systemd template
This new template can be used as replacement for getty@.service. It has the same semantics and can be used as drop-in replacement. It even uses getty@.service as fallback if kmscon fails. See the comments in the files for more information. Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Diffstat (limited to 'docs/kmsconvt@.service')
-rw-r--r--docs/kmsconvt@.service48
1 files changed, 48 insertions, 0 deletions
diff --git a/docs/kmsconvt@.service b/docs/kmsconvt@.service
new file mode 100644
index 0000000..cf6b211
--- /dev/null
+++ b/docs/kmsconvt@.service
@@ -0,0 +1,48 @@
+#
+# KMSCON system console on VTs on seat0
+# This unit takes as template argument a VT name (same as getty@.service) and
+# spawns KMSCON on this VT. Note that this does automatically limit KMSCON to
+# seat0. You cannot spawn KMSCON on other seats with this unit.
+#
+# You can replace the default getty@.service that is shipped with systemd by
+# linking it with:
+# ln -s /usr/lib/systemd/system/kmscon@.service /etc/systemd/system/autovt@.service
+# This will make systemd start KMSCON instead of agetty on each VT. Or more
+# precisely, this will make systemd-logind use kmscon@.service instead of
+# getty@.service for new VTs. In fact, all other units/scripts/... that use
+# getty@.service will not be affected by this change.
+#
+# Note that by default getty@.service installs itself as getty@tty1.service.
+# This unit does the same and overrules getty@tty1.service via the "Conflict"
+# line below.
+#
+# If KMSCON cannot start for whatever reason, this unit will cause
+# getty@.service to be started instead. So you will always have a safe fallback.
+# Furthermore, if no VTs are available, this unit will not start anything.
+#
+# You can still use getty@.service and kmsconvt@.service simultaneously on
+# different VTs, but you cannot use both on the same VT (and this wouldn't make
+# any sense).
+#
+
+[Unit]
+Description=KMS System Console on %I
+Documentation=man:kmscon(1)
+After=systemd-user-sessions.service
+After=plymouth-quit-wait.service
+Before=getty.target
+Conflicts=getty@%i.service
+OnFailure=getty@%i.service
+IgnoreOnIsolate=yes
+ConditionPathExists=/dev/tty0
+
+[Service]
+ExecStart=/usr/bin/kmscon "--vt=%I" --seats=seat0 --no-switchvt
+UtmpIdentifier=%I
+TTYPath=/dev/%I
+TTYReset=yes
+TTYVHangup=yes
+TTYVTDisallocate=yes
+
+[Install]
+Alias=getty.target.wants/kmsconvt@tty1.service