rngd: Silence initscript when rngd is already started.

When a hardware random number generator is found by udev
it will start rngd automatically which is what we also do
by default in the initialisation sequence of the system
(e.g. for RDRAND).
The user will then see an error message that rngd has
already been started which was confusing.
This commit is contained in:
Michael Tremer
2014-07-29 12:07:02 +02:00
parent 5b861b0545
commit bc70c82737
2 changed files with 9 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ etc/rc.d/init.d/dhcrelay
etc/rc.d/init.d/dnsmasq
etc/rc.d/init.d/firewall
etc/rc.d/init.d/networking/red.up/30-ddns
etc/rc.d/init.d/rngd
srv/web/ipfire/cgi-bin/ddns.cgi
srv/web/ipfire/cgi-bin/logs.cgi/firewalllogcountry.dat
srv/web/ipfire/cgi-bin/logs.cgi/log.dat

View File

@@ -28,12 +28,18 @@ case "${1}" in
fi
boot_mesg "Starting Random Number Generator Daemon..."
loadproc /usr/sbin/rngd --no-tpm=1
if pidofproc /usr/sbin/rngd &>/dev/null; then
# Is already running.
echo_ok
else
loadproc /usr/sbin/rngd --no-tpm=1
fi
;;
stop)
boot_mesg "Stopping Random Number Generator Daemon..."
killproc /usr/sbin/rngd
killproc -p /var/run/rngd.pid /usr/sbin/rngd
;;
restart)