Add RemainAfterExit=yes to plymouth's systemd service files

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>
calculate-0.9.5
Hans de Goede 4 years ago
parent ba8483fc2c
commit 75fc290c24

@ -10,3 +10,4 @@ ConditionVirtualization=!container
ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=shutdown --attach-to-session ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=shutdown --attach-to-session
ExecStartPost=-@PLYMOUTH_CLIENT_DIR@/plymouth show-splash ExecStartPost=-@PLYMOUTH_CLIENT_DIR@/plymouth show-splash
Type=forking Type=forking
RemainAfterExit=yes

@ -10,3 +10,4 @@ ConditionVirtualization=!container
ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=shutdown --attach-to-session ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=shutdown --attach-to-session
ExecStartPost=-@PLYMOUTH_CLIENT_DIR@/plymouth show-splash ExecStartPost=-@PLYMOUTH_CLIENT_DIR@/plymouth show-splash
Type=forking Type=forking
RemainAfterExit=yes

@ -10,3 +10,4 @@ ConditionVirtualization=!container
ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=shutdown --attach-to-session ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=shutdown --attach-to-session
ExecStartPost=-@PLYMOUTH_CLIENT_DIR@/plymouth show-splash ExecStartPost=-@PLYMOUTH_CLIENT_DIR@/plymouth show-splash
Type=forking Type=forking
RemainAfterExit=yes

@ -5,4 +5,5 @@ After=rc-local.service plymouth-start.service systemd-user-sessions.service
[Service] [Service]
ExecStart=-@PLYMOUTH_CLIENT_DIR@/plymouth --wait ExecStart=-@PLYMOUTH_CLIENT_DIR@/plymouth --wait
Type=oneshot Type=oneshot
RemainAfterExit=yes
TimeoutSec=0 TimeoutSec=0

@ -5,4 +5,5 @@ After=rc-local.service plymouth-start.service systemd-user-sessions.service
[Service] [Service]
ExecStart=-@PLYMOUTH_CLIENT_DIR@/plymouth quit ExecStart=-@PLYMOUTH_CLIENT_DIR@/plymouth quit
Type=oneshot Type=oneshot
RemainAfterExit=yes
TimeoutSec=20 TimeoutSec=20

@ -8,3 +8,4 @@ ConditionPathExists=!/etc/initrd-release
[Service] [Service]
ExecStart=-@PLYMOUTH_CLIENT_DIR@/plymouth update-root-fs --read-write ExecStart=-@PLYMOUTH_CLIENT_DIR@/plymouth update-root-fs --read-write
Type=oneshot Type=oneshot
RemainAfterExit=yes

@ -10,3 +10,4 @@ ConditionVirtualization=!container
ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=reboot --attach-to-session ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=reboot --attach-to-session
ExecStartPost=-@PLYMOUTH_CLIENT_DIR@/plymouth show-splash ExecStartPost=-@PLYMOUTH_CLIENT_DIR@/plymouth show-splash
Type=forking Type=forking
RemainAfterExit=yes

@ -11,5 +11,6 @@ ConditionVirtualization=!container
ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=boot --pid-file=@plymouthruntimedir@/pid --attach-to-session ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=boot --pid-file=@plymouthruntimedir@/pid --attach-to-session
ExecStartPost=-@PLYMOUTH_CLIENT_DIR@/plymouth show-splash ExecStartPost=-@PLYMOUTH_CLIENT_DIR@/plymouth show-splash
Type=forking Type=forking
RemainAfterExit=yes
KillMode=none KillMode=none
SendSIGKILL=no SendSIGKILL=no

@ -6,6 +6,7 @@ Before=initrd-switch-root.service
[Service] [Service]
Type=oneshot Type=oneshot
RemainAfterExit=yes
ExecStart=-@PLYMOUTH_CLIENT_DIR@/plymouth update-root-fs --new-root-dir=/sysroot ExecStart=-@PLYMOUTH_CLIENT_DIR@/plymouth update-root-fs --new-root-dir=/sysroot
StandardInput=null StandardInput=null
StandardOutput=null StandardOutput=null

Loading…
Cancel
Save