mirror of
https://git.yoctoproject.org/poky
synced 2026-05-09 05:29:32 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
e4881a3d22
commit
b5fc88b3d3
@@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Hardware RNG Entropy Gatherer Daemon
|
||||
|
||||
[Service]
|
||||
ExecStart=@SBINDIR@/rngd -f -r /dev/urandom
|
||||
SuccessExitStatus=66
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -8,7 +8,9 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/gkernel/${BP}.tar.gz \
|
||||
file://underquote.patch \
|
||||
file://rng-tools-5-fix-textrels-on-PIC-x86.patch \
|
||||
file://init \
|
||||
file://default"
|
||||
file://default \
|
||||
file://rngd.service \
|
||||
"
|
||||
|
||||
SRC_URI[md5sum] = "6726cdc6fae1f5122463f24ae980dd68"
|
||||
SRC_URI[sha256sum] = "60a102b6603bbcce2da341470cad42eeaa9564a16b4490e7867026ca11a3078e"
|
||||
@@ -20,7 +22,7 @@ python () {
|
||||
d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
|
||||
}
|
||||
|
||||
inherit autotools update-rc.d
|
||||
inherit autotools update-rc.d systemd
|
||||
|
||||
PACKAGECONFIG = "libgcrypt"
|
||||
PACKAGECONFIG_libc-musl = "libargp"
|
||||
@@ -38,7 +40,15 @@ do_install_append() {
|
||||
install -d "${D}${sysconfdir}/default"
|
||||
install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/rng-tools
|
||||
fi
|
||||
|
||||
if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
|
||||
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
|
||||
fi
|
||||
}
|
||||
|
||||
INITSCRIPT_NAME = "rng-tools"
|
||||
INITSCRIPT_PARAMS = "start 30 2 3 4 5 . stop 30 0 6 1 ."
|
||||
|
||||
SYSTEMD_SERVICE_${PN} = "rngd.service"
|
||||
|
||||
Reference in New Issue
Block a user