rng-tools: New package.

The rng daemon will be installed by default and will
also be installed when a hardware random number generator
is found. It will then read random data from the hardware
random number generator and will feed it into the kernel's
entropy pool.

If no HW RNG is available, a warning will be printed
at boot time.
This commit is contained in:
Michael Tremer
2014-01-29 17:22:48 +01:00
parent dabf764ee2
commit 8af8d5d127
8 changed files with 133 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
#!/bin/sh
########################################################################
# Begin $rc_base/init.d/rngd
#
# Description : Random Number Generator Daemon
#
# Authors : Michael Tremer <michael.tremer@ipfire.org>
#
########################################################################
. /etc/sysconfig/rc
. ${rc_functions}
case "${1}" in
start)
if [ ! -e "/dev/hwrng" ]; then
boot_mesg "No Hardware Random Number Generator found..." ${WARNING}
echo_warning
exit 0
fi
boot_mesg "Starting Random Number Generator Daemon..."
loadproc /usr/sbin/rngd
;;
stop)
boot_mesg "Stopping Random Number Generator Daemon..."
killproc /usr/sbin/rngd
;;
restart)
${0} stop
sleep 1
${0} start
;;
status)
statusproc /usr/sbin/rngd
;;
*)
echo "Usage: ${0} {start|stop|restart|status}"
exit 1
;;
esac
# End $rc_base/init.d/rngd