diff options
author | Dengke Du <dengke.du@windriver.com> | 2017-08-25 02:14:28 -0400 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-08-27 22:30:06 +0100 |
commit | b5fc88b3d35cc97c357ade91f0c9f376e3aed1cf (patch) | |
tree | bbd36615f01633bab71bf9d90951c1c0e06a480e /meta/recipes-support/rng-tools | |
parent | e4881a3d22ca055e27aaf8eaacfe1ea2ded79e3d (diff) | |
download | poky-b5fc88b3d35cc97c357ade91f0c9f376e3aed1cf.tar.gz |
rng-tools: add systemd service file
Add systemd service file for rng-tools.
(From OE-Core rev: d374897100ae756df72677d47c9c70c7fefca192)
Signed-off-by: Dengke Du <dengke.du@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/rng-tools')
-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" | ||