When running in a container with plymouth installed, plymouth is started
unnecessarily and systemd prints warnings:
[ OK ] Reached target Shutdown.
Sending SIGTERM to remaining processes...
Sending SIGKILL to remaining processes...
Process 253 (plymouthd) has been been marked to be excluded from killing. It is running from the root file system, and thus likely to block re-mounting of the root file system to read-only. Please consider moving it into an initrd file system instead.
It makes little sense to start plymouth in contains, so add
'ConditionVirtualization=!container' everywhere where
ConditionKernelCommandLine=!plymouth.enable=0 appears to disable plymouth
in containers.
BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1337611
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Closes: https://gitlab.freedesktop.org/plymouth/plymouth/issues/27
Before=systemd-halt.service
DefaultDependencies=no
ConditionKernelCommandLine=!plymouth.enable=0
+ConditionVirtualization=!container
[Service]
ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=shutdown --attach-to-session
Before=systemd-kexec.service
DefaultDependencies=no
ConditionKernelCommandLine=!plymouth.enable=0
+ConditionVirtualization=!container
[Service]
ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=shutdown --attach-to-session
Before=systemd-poweroff.service
DefaultDependencies=no
ConditionKernelCommandLine=!plymouth.enable=0
+ConditionVirtualization=!container
[Service]
ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=shutdown --attach-to-session
Before=systemd-reboot.service
DefaultDependencies=no
ConditionKernelCommandLine=!plymouth.enable=0
+ConditionVirtualization=!container
[Service]
ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=shutdown --attach-to-session
After=systemd-vconsole-setup.service systemd-udev-trigger.service systemd-udevd.service
Before=systemd-ask-password-plymouth.service
ConditionKernelCommandLine=!plymouth.enable=0
+ConditionVirtualization=!container
[Service]
ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=boot --pid-file=@plymouthruntimedir@/pid --attach-to-session
After=plymouth-start.service
Before=shutdown.target
ConditionKernelCommandLine=!plymouth.enable=0
+ConditionVirtualization=!container
ConditionPathExists=/run/plymouth/pid
[Service]