]>
git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/initscripts/init.d/rngd
2 ########################################################################
3 # Begin $rc_base/init.d/rngd
5 # Description : Random Number Generator Daemon
7 # Authors : Michael Tremer <michael.tremer@ipfire.org>
9 ########################################################################
14 function has_rdrand
() {
15 grep -q "rdrand" /proc
/cpuinfo
18 function has_hwrng
() {
24 if ! has_hwrng
&& ! has_rdrand
; then
25 boot_mesg
"No Hardware Random Number Generator found..."
30 boot_mesg
"Starting Random Number Generator Daemon..."
32 if pidofproc
/usr
/sbin
/rngd
&>/dev
/null
; then
36 loadproc
/usr
/sbin
/rngd
--no-tpm=1
41 boot_mesg
"Stopping Random Number Generator Daemon..."
42 killproc
-p /var
/run
/rngd.pid
/usr
/sbin
/rngd
52 statusproc
/usr
/sbin
/rngd
56 $0 restart
&>/dev
/null
60 echo "Usage: ${0} {start|stop|restart|status}"
65 # End $rc_base/init.d/rngd