From 7e3ba389191dbc241e05f4d134460bbb832ed60c Mon Sep 17 00:00:00 2001 From: Daniel Molkentin Date: Fri, 17 Mar 2017 12:13:19 +0100 Subject: [PATCH] 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. --- 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 da68eb8faa0..9f60931a9f5 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