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
|
From: Daniel Molkentin <daniel@molkentin.de>
Date: Fri, 17 Mar 2017 12:13:19 +0100
Subject: units: do not throw a warning in emergency mode if plymouth is not
installed (#5528)
Ideally, plymouth should only be referenced via dependencies,
not ExecStartPre's. This at least avoids the confusing error message
on minimal installations that do not carry plymouth.
(cherry picked from commit 7e3ba389191dbc241e05f4d134460bbb832ed60c)
---
units/emergency.service.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/units/emergency.service.in b/units/emergency.service.in
index da68eb8..9f60931 100644
--- a/units/emergency.service.in
+++ b/units/emergency.service.in
@@ -17,7 +17,7 @@ Before=shutdown.target
[Service]
Environment=HOME=/root
WorkingDirectory=-/root
-ExecStartPre=-/bin/plymouth --wait quit
+ExecStartPre=-/bin/sh -c "[ -x /bin/plymouth ] && /bin/plymouth --wait quit"
ExecStartPre=-/bin/echo -e 'You are in emergency mode. After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\ntry again to boot into default mode.'
ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default"
Type=idle
|