]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
units: do not throw a warning in emergency mode if plymouth is not installed (#5528)
authorDaniel Molkentin <daniel@molkentin.de>
Fri, 17 Mar 2017 11:13:19 +0000 (12:13 +0100)
committerMartin Pitt <martinpitt@users.noreply.github.com>
Fri, 17 Mar 2017 11:13:19 +0000 (12:13 +0100)
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

index da68eb8faa0284f7e1bfd52d0c8a883364d07355..9f60931a9f57bc025a48710eccceaf65fdfb616b 100644 (file)
@@ -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