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 <dh.herrmann@googlemail.com>
This commit is contained in:
David Herrmann 2012-12-09 18:40:26 +01:00
parent 6e8fb5aa0d
commit 929ba2b091

45
docs/getty@.service Normal file
View File

@ -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