summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support
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 /meta-oe/recipes-support
parent538ca692e824fe36bf60de1a476ce748072b5f89 (diff)
downloadmeta-openembedded-059d18c6eb1ca07b82691e48d311239397b434f8.tar.gz
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>
Diffstat (limited to 'meta-oe/recipes-support')
-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 f10fad1df..0b40fc547 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 \
10SRC_URI[md5sum] = "ae89dbfcf08bdfbea19066cfbf599127" 10SRC_URI[md5sum] = "ae89dbfcf08bdfbea19066cfbf599127"
11SRC_URI[sha256sum] = "b71bdfd4222c05e8316001556be90e1606f2a1bac3efde60153bd84e873cc195" 11SRC_URI[sha256sum] = "b71bdfd4222c05e8316001556be90e1606f2a1bac3efde60153bd84e873cc195"
12 12
13# As the recipe doesn't inherit systemd.bbclass, we need to set this variable
14# manually to avoid unnecessary postinst/preinst generated.
15python () {
16 if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
17 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
18}
19
13inherit autotools update-rc.d 20inherit autotools update-rc.d
14 21
15do_install_append() { 22do_install_append() {
16 install -d "${D}${sysconfdir}/init.d" 23 # Only install the init script when 'sysvinit' is in DISTRO_FEATURES.
17 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/rng-tools 24 if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
18 sed -i -e 's,/etc/,${sysconfdir}/,' -e 's,/usr/sbin/,${sbindir},' \ 25 install -d "${D}${sysconfdir}/init.d"
19 ${D}${sysconfdir}/init.d/rng-tools 26 install -m 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/rng-tools
27 sed -i -e 's,/etc/,${sysconfdir}/,' -e 's,/usr/sbin/,${sbindir},' \
28 ${D}${sysconfdir}/init.d/rng-tools
20 29
21 install -d "${D}${sysconfdir}/default" 30 install -d "${D}${sysconfdir}/default"
22 install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default 31 install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default
32 fi
23} 33}
24 34
25INITSCRIPT_NAME = "rng-tools" 35INITSCRIPT_NAME = "rng-tools"