summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2014-08-27 22:44:38 -0400
committerChen Qi <Qi.Chen@windriver.com>2014-09-03 15:05:43 +0800
commit711c851699d51452d2dc19211f740f5d20af60c1 (patch)
treea18b0605810625effd0761e2ac0bfeb558cbbf22
parent51182d6ab343536e3610b82fac642db7282238a9 (diff)
downloadopenembedded-core-contrib-711c851699d51452d2dc19211f740f5d20af60c1.tar.gz
openembedded-core-contrib-711c851699d51452d2dc19211f740f5d20af60c1.tar.bz2
openembedded-core-contrib-711c851699d51452d2dc19211f740f5d20af60c1.zip
modutils-initscripts: mask modutils in case of systemd
We need to prevent the init script from running via systemd because its functionality has been implemented interanlly in systemd. In a systemd system, we can add configuration files under /etc/modules-load.d/ to make things work. Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
-rw-r--r--meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb10
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb b/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb
index 125f5fb073..7031ba142c 100644
--- a/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb
+++ b/meta/recipes-kernel/modutils-initscripts/modutils-initscripts.bb
@@ -18,3 +18,13 @@ do_install () {
install -d ${D}${sysconfdir}/init.d/
install -m 0755 ${WORKDIR}/modutils.sh ${D}${sysconfdir}/init.d/
}
+
+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 modutils.service
+ fi
+}