I think that in hw_rng machines something like this is good (not
via-rng):
> #!/bin/bash
> #
> # chkconfig: 2345 20 80
> # description: Rngd daemon\
> # processname: rngd
> # pidfile: /var/run/rngd.pid
> # config: /etc/sysconfig/rngd
>
> # source function library
> . /etc/init.d/functions
>
> RETVAL=0
>
> start() {
> echo -n $"Starting rngd services: "
> modprobe via-rng
> /sbin/rngd -b -o /dev/random -r /dev/hwrng
> }
>
> stop() {
> echo -n $"Kill rngd services: "
> killproc rngd
> }
>
> case "$1" in
> start)
> start
> ;;
> stop)
> stop
> ;;
> restart|reload)
> stop
> start
> ;;
> condrestart)
> if [ -f /var/lock/subsys/rngd ]; then
> stop
> start
> fi
> ;;
> status)
> status rngd
> RETVAL=$?
> ;;
> *)
> echo $"Usage: $0 {start|stop|restart|condrestart|status}"
> exit 1
> esac
>
> exit $RETVAL
--
--
Publicidad http://www.pas-world.com