1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56
|
#
# 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
# enabling this unit:
# systemctl enable kmsconvt@
# This will make systemd start KMSCON instead of agetty on each VT. Or more
# precisely, this will make systemd-logind use kmsconvt@.service instead of
# getty@.service for new VTs. Other units 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
After=getty-pre.target
After=rc-local.service
Before=getty.target
Conflicts=rescue.service
Before=rescue.service
Conflicts=getty@%i.service
OnFailure=getty@%i.service
IgnoreOnIsolate=yes
ConditionPathExists=/dev/tty0
[Service]
ExecStart=kmscon --vt=%I --seats=seat0 --no-switchvt --login -- /sbin/agetty -8 -o '-p -- \\u' --noclear -- - $$TERM
Type=idle
UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
[Install]
Alias=autovt@.service
WantedBy=getty.target
DefaultInstance=tty1
|