[OE-core] [PATCH 21/26] keymaps: mask keymap when necessary
Chen Qi
Qi.Chen at windriver.com
Tue Sep 2 10:54:07 UTC 2014
When 'sysvinit' and 'systemd' are both in DISTRO_FEATURES, we need
to prevent the init script from running via systemd.
This is because that the functionality of the init script has implemented
in systemd internally.
Signed-off-by: Chen Qi <Qi.Chen at windriver.com>
---
meta/recipes-bsp/keymaps/keymaps_1.0.bb | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/meta/recipes-bsp/keymaps/keymaps_1.0.bb b/meta/recipes-bsp/keymaps/keymaps_1.0.bb
index a3f2d89..925161b 100644
--- a/meta/recipes-bsp/keymaps/keymaps_1.0.bb
+++ b/meta/recipes-bsp/keymaps/keymaps_1.0.bb
@@ -35,4 +35,14 @@ do_install () {
fi
}
+DEPENDS_append = " ${@bb.utils.contains('DISTRO_FEATURES','systemd','systemd-systemctl-native','',d)}"
+pkg_postinst_${PN} () {
+ if ${@bb.utils.contains('DISTRO_FEATURES','systemd sysvinit','true','false',d)}; then
+ if [ -n "$D" ]; then
+ OPTS="--root=$D"
+ fi
+ systemctl $OPTS mask keymap.service
+ fi
+}
+
ALLOW_EMPTY_${PN} = "1"
--
1.9.1
More information about the Openembedded-core
mailing list