aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Larson <chris_larson@mentor.com>2014-12-29 13:50:17 -0700
committerMartin Jansa <Martin.Jansa@gmail.com>2015-01-05 13:24:06 +0100
commit059d18c6eb1ca07b82691e48d311239397b434f8 (patch)
tree0827f485619e1e5d9321522b1929be0f6c3dee1e
parent538ca692e824fe36bf60de1a476ce748072b5f89 (diff)
downloadmeta-openembedded-contrib-059d18c6eb1ca07b82691e48d311239397b434f8.tar.gz
meta-openembedded-contrib-059d18c6eb1ca07b82691e48d311239397b434f8.tar.bz2
meta-openembedded-contrib-059d18c6eb1ca07b82691e48d311239397b434f8.zip
rng-tools: obey the sysvinit distro feature
Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r--meta-oe/recipes-support/rng-tools/rng-tools_4.bb22
1 files changed, 16 insertions, 6 deletions
diff --git a/meta-oe/recipes-support/rng-tools/rng-tools_4.bb b/meta-oe/recipes-support/rng-tools/rng-tools_4.bb
index f10fad1df9..0b40fc5479 100644
--- a/meta-oe/recipes-support/rng-tools/rng-tools_4.bb
+++ b/meta-oe/recipes-support/rng-tools/rng-tools_4.bb
@@ -10,16 +10,26 @@ SRC_URI = "http://heanet.dl.sourceforge.net/sourceforge/gkernel/${BP}.tar.gz \
SRC_URI[md5sum] = "ae89dbfcf08bdfbea19066cfbf599127"
SRC_URI[sha256sum] = "b71bdfd4222c05e8316001556be90e1606f2a1bac3efde60153bd84e873cc195"
+# As the recipe doesn't inherit systemd.bbclass, we need to set this variable
+# manually to avoid unnecessary postinst/preinst generated.
+python () {
+ if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+ d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
+
inherit autotools update-rc.d
do_install_append() {
- install -d "${D}${sysconfdir}/init.d"
- install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/rng-tools
- sed -i -e 's,/etc/,${sysconfdir}/,' -e 's,/usr/sbin/,${sbindir},' \
- ${D}${sysconfdir}/init.d/rng-tools
+ # Only install the init script when 'sysvinit' is in DISTRO_FEATURES.
+ if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
+ install -d "${D}${sysconfdir}/init.d"
+ install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/rng-tools
+ sed -i -e 's,/etc/,${sysconfdir}/,' -e 's,/usr/sbin/,${sbindir},' \
+ ${D}${sysconfdir}/init.d/rng-tools
- install -d "${D}${sysconfdir}/default"
- install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default
+ install -d "${D}${sysconfdir}/default"
+ install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default
+ fi
}
INITSCRIPT_NAME = "rng-tools"