]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
units: restore Before dependencies for systemd-vconsole-setup.service 5192/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 31 Jan 2017 05:34:33 +0000 (00:34 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 31 Jan 2017 06:34:40 +0000 (01:34 -0500)
When the service is run in the initramfs, it is possible for it to get started
and not be fast enough to exit before the root switch happens. It is started
multiple times (depending on the consoles being detected), and runs
asynchronously, so this is quite likely. It'll then get killed by killall(),
and systemd will consider the service failed. To avoid all this, just wait
for the service to terminate on it's own.

Before=initrd-switch-root.target should be good for the initramfs, and
Before=shutdown.tuarget should be good for the real system, although it's
unlikely to make any difference there.

units/systemd-vconsole-setup.service.in

index 2bd1fd1a5d32b9557d97f79ac3154de9adb2cd5f..8bb75c6a4f93976adebe67b79ce92af8a5744030 100644 (file)
@@ -9,6 +9,7 @@
 Description=Setup Virtual Console
 Documentation=man:systemd-vconsole-setup.service(8) man:vconsole.conf(5)
 DefaultDependencies=no
+Before=initrd-switch-root.target shutdown.target
 ConditionPathExists=/dev/tty0
 
 [Service]