]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
systemd-units: Add "ConditionVirtualization=!container"
authorHans de Goede <hdegoede@redhat.com>
Tue, 7 Aug 2018 08:15:56 +0000 (10:15 +0200)
committerRay Strode <rstrode@redhat.com>
Tue, 7 Aug 2018 13:58:58 +0000 (09:58 -0400)
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
systemd-units/plymouth-halt.service.in
systemd-units/plymouth-kexec.service.in
systemd-units/plymouth-poweroff.service.in
systemd-units/plymouth-reboot.service.in
systemd-units/plymouth-start.service.in
systemd-units/systemd-ask-password-plymouth.service.in

index 59a1912b51b82d08ab007a1e84dcc92692decd7b..38ae98ce674b1d5ee3df2eff1933db18109fba53 100644 (file)
@@ -4,6 +4,7 @@ After=getty@tty1.service display-manager.service plymouth-start.service
 Before=systemd-halt.service
 DefaultDependencies=no
 ConditionKernelCommandLine=!plymouth.enable=0
+ConditionVirtualization=!container
 
 [Service]
 ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=shutdown --attach-to-session
index 5a390376c894978ab56f6a67f277fedbafc3f447..bed5eb7914f24ab9f36a1aebef396441f6f8fdbf 100644 (file)
@@ -4,6 +4,7 @@ After=getty@tty1.service display-manager.service plymouth-start.service
 Before=systemd-kexec.service
 DefaultDependencies=no
 ConditionKernelCommandLine=!plymouth.enable=0
+ConditionVirtualization=!container
 
 [Service]
 ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=shutdown --attach-to-session
index 8ebaf76e187854f81fb8f7663380d1e659dede4a..7891e97d221ee5b4947b3b0e403e7d32ed0110c3 100644 (file)
@@ -4,6 +4,7 @@ After=getty@tty1.service display-manager.service plymouth-start.service
 Before=systemd-poweroff.service
 DefaultDependencies=no
 ConditionKernelCommandLine=!plymouth.enable=0
+ConditionVirtualization=!container
 
 [Service]
 ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=shutdown --attach-to-session
index 6d5309f5bc852d21bd165b28ba1a3579451b91ce..1d577896d5cfeb7b543c902c545581adf651972e 100644 (file)
@@ -4,6 +4,7 @@ After=getty@tty1.service display-manager.service plymouth-start.service
 Before=systemd-reboot.service
 DefaultDependencies=no
 ConditionKernelCommandLine=!plymouth.enable=0
+ConditionVirtualization=!container
 
 [Service]
 ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=shutdown --attach-to-session
index ddfb08fdc68f70ccbf0e4c982abc4558cee26e9e..5d88f604e9fdd1dd4d04c6ee568061948b8d7aa6 100644 (file)
@@ -5,6 +5,7 @@ Wants=systemd-ask-password-plymouth.path systemd-vconsole-setup.service
 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
index 0c3acde9fb01466a1dcc6d8af644e33117bc5907..242b7334b4de3bf20ba346e63dbf483057736fbf 100644 (file)
@@ -6,6 +6,7 @@ Conflicts=shutdown.target
 After=plymouth-start.service
 Before=shutdown.target
 ConditionKernelCommandLine=!plymouth.enable=0
+ConditionVirtualization=!container
 ConditionPathExists=/run/plymouth/pid
 
 [Service]