summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2014-09-03 15:09:17 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-09-03 11:09:06 +0100
commitc57427b4a7991e33b806d4fd0956b6010ed52f62 (patch)
tree2638c92ffd77420e17804ad9e49ff3444cdb77d7
parent3b00803dd17a5ae7d9115d4ebb0e38d00751a559 (diff)
downloadast2050-yocto-poky-c57427b4a7991e33b806d4fd0956b6010ed52f62.zip
ast2050-yocto-poky-c57427b4a7991e33b806d4fd0956b6010ed52f62.tar.gz
keymaps: mask keymap when necessary
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. (From OE-Core rev: 8cfba07e24dae3d1837ccb5cb04e11f362519b0a) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-bsp/keymaps/keymaps_1.0.bb10
1 files changed, 10 insertions, 0 deletions
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"
OpenPOWER on IntegriCloud