We cannot reliably detect in this script any more if the
system has an actual HWRNG (/dev/hwrng always exists).
Therefore we always start the daemon now and let it
deal with what ever comes.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
. /etc/sysconfig/rc
. ${rc_functions}
-function has_rdrand() {
- grep -q "rdrand" /proc/cpuinfo
-}
-
-function has_hwrng() {
- [ -e "/dev/hwrng" ]
-}
-
case "${1}" in
start)
- if ! has_hwrng && ! has_rdrand; then
- boot_mesg "No Hardware Random Number Generator found..."
- echo_warning
- exit 0
- fi
-
boot_mesg "Starting Random Number Generator Daemon..."
loadproc /usr/sbin/rngd --quiet
;;