summaryrefslogtreecommitdiff
path: root/sys-apps/rng-tools/files/rngd-initd-r1-4.1
blob: 1e63c847d3708b4d033180617b10c85ceb173603 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/sbin/runscript
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

depend() {
	need localmount
	after urandom
	provide entropy
}

# Do NOT add /dev/tpm to this.
DEFAULT_DEVICE="/dev/hw_random* /dev/hwrandom* /dev/i810_rng /dev/hwrng*"

command=/usr/sbin/rngd
pidfile="/var/run/${SVCNAME}.pid"
command_args="--pid-file ${pidfile} --background --random-step ${STEP:-64} ${NO_TPM:+--no-tpm=1} \
	${NO_DRNG:+--no-drng=1} --fill-watermark ${WATERMARK} ${DEVICE:+--rng-device ${DEVICE}}"
start_stop_daemon_args="--wait 1000"
retry="SIGKILL/5000"