summaryrefslogtreecommitdiff
path: root/meta/recipes-kernel
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2014-09-03 15:09:20 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-03 10:24:22 +0100
commit8fc304a59bb3977146645fe2c3570a3aaa4aac39 (patch)
tree8fa0fd7195ad014f7265c05269ef936e41c1a8a5 /meta/recipes-kernel
parent2e847db3ac3333a68b721b11624f4f515bda7ccf (diff)
downloadopenembedded-core-8fc304a59bb3977146645fe2c3570a3aaa4aac39.tar.gz
openembedded-core-8fc304a59bb3977146645fe2c3570a3aaa4aac39.tar.bz2
openembedded-core-8fc304a59bb3977146645fe2c3570a3aaa4aac39.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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel')
-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
+}