summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2014-02-11 22:43:04 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-02-11 22:59:10 +0000
commit844f897710dfee9c59599d09b5c8c906e0d70ac0 (patch)
treed3048a2c530deda5a1524eef9851eb4e376cfd70 /meta
parent2325c1ee13bc3a8474238e8a6c20b6a3c671bf07 (diff)
downloadopenembedded-core-844f897710dfee9c59599d09b5c8c906e0d70ac0.tar.gz
openembedded-core-844f897710dfee9c59599d09b5c8c906e0d70ac0.tar.bz2
openembedded-core-844f897710dfee9c59599d09b5c8c906e0d70ac0.zip
initscripts: mask initscripts from systemd
Many of the init scripts in here will do nasty things if systemd decides to run them. Mask the obviously bad ones so that systemd won't attempt to invoke them if initscripts is installed with systemd. Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-core/initscripts/initscripts_1.0.bb25
1 files changed, 25 insertions, 0 deletions
diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
index d1644a3204..20c025752b 100644
--- a/meta/recipes-core/initscripts/initscripts_1.0.bb
+++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
@@ -41,6 +41,7 @@ KERNEL_VERSION = ""
inherit update-alternatives
DEPENDS_append = " update-rc.d-native"
+DEPENDS_append = " ${@base_contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
PACKAGES =+ "${PN}-functions"
RDEPENDS_${PN} = "${PN}-functions"
@@ -134,3 +135,27 @@ do_install () {
# populate-volatile.sh
update-rc.d -r ${D} dmesg.sh start 38 S .
}
+
+MASKED_SCRIPTS = " \
+ banner \
+ bootmisc \
+ checkroot \
+ devpts \
+ hostname \
+ mountall \
+ mountnfs \
+ rmnologin \
+ sysfs \
+ urandom"
+
+pkg_postinst_${PN} () {
+ if ${@base_contains('DISTRO_FEATURES','systemd','true','false',d)}; then
+ if [ -n "$D" ]; then
+ OPTS="--root=$D"
+ fi
+ for SERVICE in ${MASKED_SCRIPTS}; do
+ systemctl $OPTS mask $SERVICE.service
+ done
+ fi
+fi
+}