From 929ba2b091c90e5d6f48527ce112c640015dbcc4 Mon Sep 17 00:00:00 2001 From: David Herrmann Date: Sun, 9 Dec 2012 18:40:26 +0100 Subject: [PATCH] Add getty@.service replacement 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 --- docs/getty@.service | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 docs/getty@.service diff --git a/docs/getty@.service b/docs/getty@.service new file mode 100644 index 0000000..7699932 --- /dev/null +++ b/docs/getty@.service @@ -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