daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
ff2b41
From 9335b508002f0d10c64011a90d81b515b53f0ac3 Mon Sep 17 00:00:00 2001
ff2b41
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
ff2b41
Date: Tue, 31 Jan 2017 00:34:33 -0500
ff2b41
Subject: [PATCH] units: restore Before dependencies for
ff2b41
 systemd-vconsole-setup.service
ff2b41
ff2b41
When the service is run in the initramfs, it is possible for it to get started
ff2b41
and not be fast enough to exit before the root switch happens. It is started
ff2b41
multiple times (depending on the consoles being detected), and runs
ff2b41
asynchronously, so this is quite likely. It'll then get killed by killall(),
ff2b41
and systemd will consider the service failed. To avoid all this, just wait
ff2b41
for the service to terminate on it's own.
ff2b41
ff2b41
Before=initrd-switch-root.target should be good for the initramfs, and
ff2b41
Before=shutdown.tuarget should be good for the real system, although it's
ff2b41
unlikely to make any difference there.
ff2b41
ff2b41
(cherry picked from commit 750e550eba362096d56a35104c6a32631aa67b8e)
ff2b41
ff2b41
Related: #1754053
ff2b41
---
ff2b41
 units/systemd-vconsole-setup.service.in | 2 +-
ff2b41
 1 file changed, 1 insertion(+), 1 deletion(-)
ff2b41
ff2b41
diff --git a/units/systemd-vconsole-setup.service.in b/units/systemd-vconsole-setup.service.in
ff2b41
index 18faa63f28..8aba67b393 100644
ff2b41
--- a/units/systemd-vconsole-setup.service.in
ff2b41
+++ b/units/systemd-vconsole-setup.service.in
ff2b41
@@ -11,7 +11,7 @@ Documentation=man:systemd-vconsole-setup.service(8) man:vconsole.conf(5)
ff2b41
 DefaultDependencies=no
ff2b41
 Conflicts=shutdown.target
ff2b41
 After=systemd-readahead-collect.service systemd-readahead-replay.service
ff2b41
-Before=sysinit.target shutdown.target
ff2b41
+Before=sysinit.target initrd-switch-root.target shutdown.target
ff2b41
 ConditionPathExists=/dev/tty0
ff2b41
 
ff2b41
 [Service]