[oe-commits] Chen Qi : psplash: mask psplash in case of systemd

git at git.openembedded.org git at git.openembedded.org
Tue Sep 2 13:50:20 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: 404e62bddb3221f22fdb2d16480d0322ba1e8a9b
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=404e62bddb3221f22fdb2d16480d0322ba1e8a9b

Author: Chen Qi <Qi.Chen at windriver.com>
Date:   Tue Sep  2 18:54:09 2014 +0800

psplash: mask psplash in case of systemd

We need to prevent the psplash init script from running via systemd
because the script is supposed to be used by sysvinit system and it
doesn't have any real effect in a systemd based system.

Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 meta/recipes-core/psplash/psplash_git.bb | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/meta/recipes-core/psplash/psplash_git.bb b/meta/recipes-core/psplash/psplash_git.bb
index 628ced4..4e8f071 100644
--- a/meta/recipes-core/psplash/psplash_git.bb
+++ b/meta/recipes-core/psplash/psplash_git.bb
@@ -109,3 +109,13 @@ FILES_${PN} += "/mnt/.psplash"
 
 INITSCRIPT_NAME = "psplash.sh"
 INITSCRIPT_PARAMS = "start 0 S . stop 20 0 1 6 ."
+
+DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
+pkg_postinst_${PN} () {
+	if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+		if [ -n "$D" ]; then
+			OPTS="--root=$D"
+		fi
+		systemctl $OPTS mask psplash.service
+	fi
+}



More information about the Openembedded-commits mailing list