diff options
Diffstat (limited to 'meta-phosphor/recipes-support/rng-tools')
-rw-r--r-- | meta-phosphor/recipes-support/rng-tools/rng-tools/rngd.service | 8 | ||||
-rw-r--r-- | meta-phosphor/recipes-support/rng-tools/rng-tools_%.bbappend | 17 |
2 files changed, 25 insertions, 0 deletions
diff --git a/meta-phosphor/recipes-support/rng-tools/rng-tools/rngd.service b/meta-phosphor/recipes-support/rng-tools/rng-tools/rngd.service new file mode 100644 index 0000000000..7b0e9a71f5 --- /dev/null +++ b/meta-phosphor/recipes-support/rng-tools/rng-tools/rngd.service @@ -0,0 +1,8 @@ +[Unit] +Description=Hardware RNG Entropy Gatherer Daemon + +[Service] +ExecStart=@SBINDIR@/rngd -f + +[Install] +WantedBy=multi-user.target diff --git a/meta-phosphor/recipes-support/rng-tools/rng-tools_%.bbappend b/meta-phosphor/recipes-support/rng-tools/rng-tools_%.bbappend new file mode 100644 index 0000000000..cda8e0b51b --- /dev/null +++ b/meta-phosphor/recipes-support/rng-tools/rng-tools_%.bbappend @@ -0,0 +1,17 @@ + +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI += "file://rngd.service" + +inherit systemd + +SYSTEMD_SERVICE_${PN} = "rngd.service" + +do_install_append() { + 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 +} + |