Unverified Commit ac48e7e0 authored by mrl5's avatar mrl5

main/rng-tools: fix openrc service startup

fixes #12235
parent b84a8a1f
Pipeline #66087 passed with stages
in 1 minute and 25 seconds
......@@ -2,7 +2,7 @@
# Maintainer: ScrumpyJack <scrumypjack@st.ilet.to>
pkgname=rng-tools
pkgver=6.10
pkgrel=2
pkgrel=3
pkgdesc="A random number generator daemon"
url="https://github.com/nhorman/rng-tools"
arch="all"
......@@ -61,4 +61,4 @@ sha512sums="b72d8918f709989ebc70cb9ea9c8b3dabf53041b24bc3f3a6de1bea318861dfd6c1a
c65d177b20948f88341b22149325011fca93da1137cb176f642ae1944ffc2110141e123518fcc1329346a21c57a51a6cf22f8f06f7d10337a7b1a50c243e97cf fix-encrypt-name-clash.patch
bd0a6caf5a44796c7efdacfa19fb725c2ea61951dec039607471382597fdc919d28640e159dd58db8df4d7f36e12318f86b078666fad1929816031061b13f677 stack.patch
363b5aa431a0da37fc9eb8c93cffed0b75f43064530318fb41c774acd8aab8a1e109cf6c294b77fa6b8f97aa355b2849f56e83d8b06bcd9e0e9f3aa4f3ba49ac rngd.confd
86a6a7446eda64c075e468bc304008314b710629e06146582c5ce3fcc307a6b4baf5f8e8a47b72f1bab0bb608d76f953f2712cddd35809abcb02b8320c682535 rngd.initd"
c1e3d94509d5cd3301836961598e221ef0db2e7310386f0467a4f3068eada8ad4010b063202b8a8c3d163d39799aea7d6a4dcb4d8ca569fe7b51f5c870100b6d rngd.initd"
#!/sbin/openrc-run
description="Random number generator daemon"
pidfile="/run/$RC_SVCNAME.pid"
command="/usr/sbin/rngd"
command_args="--quiet --background --pid-file $pidfile $RNGD_OPTS"
start_stop_daemon_args="--wait 5"
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
depend() {
need localmount
after urandom
provide entropy
}
command="/usr/sbin/rngd"
description="Check and feed random data from hardware device to kernel entropy pool."
pidfile="/run/${RC_SVCNAME}.pid"
command_args=""
command_args_background="--pid-file ${pidfile} --background"
start_stop_daemon_args="--wait 1000"
retry="SIGKILL/5000"
# Parse rngd confd file for extra command line arguments
start_pre() {
for entsrc in ${INCLUDE_ENTROPY_SOURCES}; do
command_args="${command_args} -n ${entsrc}"
done
for entsrc in ${EXCLUDE_ENTROPY_SOURCES}; do
command_args="${command_args} -x ${entsrc}"
done
if [ "x${HWRNG_DEVICE}" != "x" ]; then
command_args="${command_args} --rng-device=${HWRNG_DEVICE}"
fi
for entsrc_opt in ${RDRAND_OPTIONS}; do
command_args="${command_args} -O rdrand:${entsrc_opt}"
done
for entsrc_opt in ${DARN_OPTIONS}; do
command_args="${command_args} -O darn:${entsrc_opt}"
done
for entsrc_opt in ${JITTER_OPTIONS}; do
command_args="${command_args} -O jitter:${entsrc_opt}"
done
for entsrc_opt in ${PKCS11_OPTIONS}; do
command_args="${command_args} -O pkcs11:${entsrc_opt}"
done
if [ "x${RANDOM_DEVICE}" != "x" ]; then
command_args="${command_args} --random-device=${RANDOM_DEVICE}"
fi
if [ "x${STEP}" != "x" ]; then
command_args="${command_args} --random-step=${STEP}"
fi
if [ "x${WATERMARK}" != "x" ]; then
command_args="${command_args} --fill-watermark=${WATERMARK}"
fi
command_args="${command_args} ${EXTRA_ARGS}"
return 0
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment