diff options
-rw-r--r-- | meta/recipes-support/rng-tools/rng-tools/rngd.service | 9 | ||||
-rw-r--r-- | meta/recipes-support/rng-tools/rng-tools_5.bb | 14 |
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] | ||
2 | Description=Hardware RNG Entropy Gatherer Daemon | ||
3 | |||
4 | [Service] | ||
5 | ExecStart=@SBINDIR@/rngd -f -r /dev/urandom | ||
6 | SuccessExitStatus=66 | ||
7 | |||
8 | [Install] | ||
9 | WantedBy=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 | ||
13 | SRC_URI[md5sum] = "6726cdc6fae1f5122463f24ae980dd68" | 15 | SRC_URI[md5sum] = "6726cdc6fae1f5122463f24ae980dd68" |
14 | SRC_URI[sha256sum] = "60a102b6603bbcce2da341470cad42eeaa9564a16b4490e7867026ca11a3078e" | 16 | SRC_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 | ||
23 | inherit autotools update-rc.d | 25 | inherit autotools update-rc.d systemd |
24 | 26 | ||
25 | PACKAGECONFIG = "libgcrypt" | 27 | PACKAGECONFIG = "libgcrypt" |
26 | PACKAGECONFIG_libc-musl = "libargp" | 28 | PACKAGECONFIG_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 | ||
43 | INITSCRIPT_NAME = "rng-tools" | 51 | INITSCRIPT_NAME = "rng-tools" |
44 | INITSCRIPT_PARAMS = "start 30 2 3 4 5 . stop 30 0 6 1 ." | 52 | INITSCRIPT_PARAMS = "start 30 2 3 4 5 . stop 30 0 6 1 ." |
53 | |||
54 | SYSTEMD_SERVICE_${PN} = "rngd.service" | ||