From: Chen Qi Date: Wed, 3 Sep 2014 07:09:17 +0000 (+0800) Subject: keymaps: mask keymap when necessary X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~32464 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8cfba07e24dae3d1837ccb5cb04e11f362519b0a;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git 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. Signed-off-by: Chen Qi Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-bsp/keymaps/keymaps_1.0.bb b/meta/recipes-bsp/keymaps/keymaps_1.0.bb index a3f2d89b266..925161b5d28 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"