summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-support/rng-tools/rng-tools/rngd.service9
-rw-r--r--meta/recipes-support/rng-tools/rng-tools_5.bb14
2 files changed, 21 insertions, 2 deletions
diff --git a/meta/recipes-support/rng-tools/rng-tools/rngd.service b/meta/recipes-support/rng-tools/rng-tools/rngd.service
new file mode 100644
index 0000000000..b94ad50209
--- /dev/null
+++ b/meta/recipes-support/rng-tools/rng-tools/rngd.service
@@ -0,0 +1,9 @@
1[Unit]
2Description=Hardware RNG Entropy Gatherer Daemon
3
4[Service]
5ExecStart=@SBINDIR@/rngd -f -r /dev/urandom
6SuccessExitStatus=66
7
8[Install]
9WantedBy=multi-user.target
diff --git a/meta/recipes-support/rng-tools/rng-tools_5.bb b/meta/recipes-support/rng-tools/rng-tools_5.bb
index de6e5f9a76..4a66bed643 100644
--- a/meta/recipes-support/rng-tools/rng-tools_5.bb
+++ b/meta/recipes-support/rng-tools/rng-tools_5.bb
@@ -8,7 +8,9 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/gkernel/${BP}.tar.gz \
8 file://underquote.patch \ 8 file://underquote.patch \
9 file://rng-tools-5-fix-textrels-on-PIC-x86.patch \ 9 file://rng-tools-5-fix-textrels-on-PIC-x86.patch \
10 file://init \ 10 file://init \
11 file://default" 11 file://default \
12 file://rngd.service \
13"
12 14
13SRC_URI[md5sum] = "6726cdc6fae1f5122463f24ae980dd68" 15SRC_URI[md5sum] = "6726cdc6fae1f5122463f24ae980dd68"
14SRC_URI[sha256sum] = "60a102b6603bbcce2da341470cad42eeaa9564a16b4490e7867026ca11a3078e" 16SRC_URI[sha256sum] = "60a102b6603bbcce2da341470cad42eeaa9564a16b4490e7867026ca11a3078e"
@@ -20,7 +22,7 @@ python () {
20 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") 22 d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
21} 23}
22 24
23inherit autotools update-rc.d 25inherit autotools update-rc.d systemd
24 26
25PACKAGECONFIG = "libgcrypt" 27PACKAGECONFIG = "libgcrypt"
26PACKAGECONFIG_libc-musl = "libargp" 28PACKAGECONFIG_libc-musl = "libargp"
@@ -38,7 +40,15 @@ do_install_append() {
38 install -d "${D}${sysconfdir}/default" 40 install -d "${D}${sysconfdir}/default"
39 install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/rng-tools 41 install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/rng-tools
40 fi 42 fi
43
44 if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
45 install -d ${D}${systemd_unitdir}/system
46 install -m 644 ${WORKDIR}/rngd.service ${D}${systemd_unitdir}/system
47 sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/rngd.service
48 fi
41} 49}
42 50
43INITSCRIPT_NAME = "rng-tools" 51INITSCRIPT_NAME = "rng-tools"
44INITSCRIPT_PARAMS = "start 30 2 3 4 5 . stop 30 0 6 1 ." 52INITSCRIPT_PARAMS = "start 30 2 3 4 5 . stop 30 0 6 1 ."
53
54SYSTEMD_SERVICE_${PN} = "rngd.service"