]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
Add RemainAfterExit=yes to plymouth's systemd service files
authorHans de Goede <hdegoede@redhat.com>
Mon, 23 Mar 2020 14:59:24 +0000 (15:59 +0100)
committerHans de Goede <hdegoede@redhat.com>
Mon, 23 Mar 2020 16:22:46 +0000 (17:22 +0100)
All plymouth's systemd unit files are meant to only run once, either during
boot or during shutdown/restart.

Certain events cause systemd to recheck the dependency try between systemd
units. Systemd had a bug before the 245 release which caused this check to
sometimes not restart exited services for which the dependencies are met.

Systemd 245 fixes this, this is causing problems with plymouth.
When the conditions are met for systemd to recheck the dependencies;
and the plymouthd started by plymouth-start.service has exited;
then systemd will restart the plymouth-start unit, causing plymouthd to
take over tty1 after boot. This is causing various problems, also see:

https://bugzilla.redhat.com/show_bug.cgi?id=1803293

Since all plymouth's systemd units are intended to run only once, they
all should be marked as remaining after exit by adding:
"RemainAfterExit=yes" to them. This causes systemd to still consider them
running after e.g. plymouthd has exited, as long as they have started
successfully. This fixes systemd restarting plymouth's units when it
should not do so.

BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1803293
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1807771
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
systemd-units/plymouth-halt.service.in
systemd-units/plymouth-kexec.service.in
systemd-units/plymouth-poweroff.service.in
systemd-units/plymouth-quit-wait.service.in
systemd-units/plymouth-quit.service.in
systemd-units/plymouth-read-write.service.in
systemd-units/plymouth-reboot.service.in
systemd-units/plymouth-start.service.in
systemd-units/plymouth-switch-root.service.in

index 38ae98ce674b1d5ee3df2eff1933db18109fba53..cb87c1f4f7994b546218b93c7f9fbb2064b55dbe 100644 (file)
@@ -10,3 +10,4 @@ ConditionVirtualization=!container
 ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=shutdown --attach-to-session
 ExecStartPost=-@PLYMOUTH_CLIENT_DIR@/plymouth show-splash
 Type=forking
+RemainAfterExit=yes
index bed5eb7914f24ab9f36a1aebef396441f6f8fdbf..22bc5bd062690d14a8a09b081bfb7749c6f3f535 100644 (file)
@@ -10,3 +10,4 @@ ConditionVirtualization=!container
 ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=shutdown --attach-to-session
 ExecStartPost=-@PLYMOUTH_CLIENT_DIR@/plymouth show-splash
 Type=forking
+RemainAfterExit=yes
index 7891e97d221ee5b4947b3b0e403e7d32ed0110c3..cf05e47f3355b724382acbe861fb05ff0b3dafec 100644 (file)
@@ -10,3 +10,4 @@ ConditionVirtualization=!container
 ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=shutdown --attach-to-session
 ExecStartPost=-@PLYMOUTH_CLIENT_DIR@/plymouth show-splash
 Type=forking
+RemainAfterExit=yes
index fbb235c7addada93111b46b35a7e110d2ee88b7c..94f66cc6e6082299c50f4779122758a85a9b700e 100644 (file)
@@ -5,4 +5,5 @@ After=rc-local.service plymouth-start.service systemd-user-sessions.service
 [Service]
 ExecStart=-@PLYMOUTH_CLIENT_DIR@/plymouth --wait
 Type=oneshot
+RemainAfterExit=yes
 TimeoutSec=0
index cf9901ef5342e5cddefdee9839fab9467cfcafad..ed9f9b98d86ea8c3729dea7795656fe03f95e036 100644 (file)
@@ -5,4 +5,5 @@ After=rc-local.service plymouth-start.service systemd-user-sessions.service
 [Service]
 ExecStart=-@PLYMOUTH_CLIENT_DIR@/plymouth quit
 Type=oneshot
+RemainAfterExit=yes
 TimeoutSec=20
index 55b975eaffd9debd76d71bfbab6dc332aaaf28c9..9a6b9c22f46b8f7966bff2584692739d11957b82 100644 (file)
@@ -8,3 +8,4 @@ ConditionPathExists=!/etc/initrd-release
 [Service]
 ExecStart=-@PLYMOUTH_CLIENT_DIR@/plymouth update-root-fs --read-write
 Type=oneshot
+RemainAfterExit=yes
index 147f8248db06872ec45e4b1328d06f0007b321e4..3624550dcf13b471130da6dd3f29ca816b61f7c7 100644 (file)
@@ -10,3 +10,4 @@ ConditionVirtualization=!container
 ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=reboot --attach-to-session
 ExecStartPost=-@PLYMOUTH_CLIENT_DIR@/plymouth show-splash
 Type=forking
+RemainAfterExit=yes
index 5d88f604e9fdd1dd4d04c6ee568061948b8d7aa6..3d00cc6f3162d61d49db817f56f03ed3f26ca56d 100644 (file)
@@ -11,5 +11,6 @@ ConditionVirtualization=!container
 ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=boot --pid-file=@plymouthruntimedir@/pid --attach-to-session
 ExecStartPost=-@PLYMOUTH_CLIENT_DIR@/plymouth show-splash
 Type=forking
+RemainAfterExit=yes
 KillMode=none
 SendSIGKILL=no
index 89866555258cde2e3630633f85a037d42272af7b..20b7f7b762f4cddd1c2077696c65421ed40e867e 100644 (file)
@@ -6,6 +6,7 @@ Before=initrd-switch-root.service
 
 [Service]
 Type=oneshot
+RemainAfterExit=yes
 ExecStart=-@PLYMOUTH_CLIENT_DIR@/plymouth update-root-fs --new-root-dir=/sysroot
 StandardInput=null
 StandardOutput=null