aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/rng-tools/rng-tools_6.6.bb
diff options
context:
space:
mode:
authorNicola Lunghi <nick83ola@gmail.com>2019-06-12 14:00:05 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-06-12 23:15:45 +0100
commit16ced1a253c74c01ca414db2f1a010c083213b91 (patch)
treea66a3b9824a5c47dfb00ed3d7a99c2e45a340eb7 /meta/recipes-support/rng-tools/rng-tools_6.6.bb
parentca737408bb7e9dd24f3a18e60fad290c6e539b7b (diff)
downloadopenembedded-core-contrib-16ced1a253c74c01ca414db2f1a010c083213b91.tar.gz
rng-tools: harmonise systemd and sysvinit
this commit will permit to read the option from /etc/default/rng-tools both from systemd and sysvinit unit file. Signed-off-by: Nicola Lunghi <nick83ola@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/rng-tools/rng-tools_6.6.bb')
-rw-r--r--meta/recipes-support/rng-tools/rng-tools_6.6.bb23
1 files changed, 9 insertions, 14 deletions
diff --git a/meta/recipes-support/rng-tools/rng-tools_6.6.bb b/meta/recipes-support/rng-tools/rng-tools_6.6.bb
index 41959a2695..b0afa4b0eb 100644
--- a/meta/recipes-support/rng-tools/rng-tools_6.6.bb
+++ b/meta/recipes-support/rng-tools/rng-tools_6.6.bb
@@ -44,18 +44,13 @@ do_configure_prepend() {
}
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 default script when 'sysvinit' is in DISTRO_FEATURES.
- if ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', 'true', 'false', d)}; then
- install -d "${D}${sysconfdir}/default"
- install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/rng-tools
- fi
-
- install -d ${D}${systemd_unitdir}/system
- install -m 644 ${WORKDIR}/rngd.service ${D}${systemd_unitdir}/system
- sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/rngd.service
+ install -Dm 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/rng-tools
+ install -Dm 0755 ${WORKDIR}/init ${D}${sysconfdir}/init.d/rng-tools
+ install -Dm 0644 ${WORKDIR}/rngd.service \
+ ${D}${systemd_system_unitdir}/rngd.service
+ sed -i \
+ -e 's,@SYSCONFDIR@,${sysconfdir},' \
+ -e 's,@SBINDIR@,${sbindir},' \
+ ${D}${sysconfdir}/init.d/rng-tools \
+ ${D}${systemd_system_unitdir}/rngd.service
}