Package: rng-tools
Version: 2-unofficial-mt.14-1
Severity: normal
Tags: patch

Hi,

it looks like when the rng-tools package is installed on a system
without a hwrng device, the init script returns 1, which I think is
wrong.  The patch below seems to fix it for me.

diff -r 002107a1df85 init.d/rng-tools
--- a/init.d/rng-tools  Tue Dec 16 15:14:07 2014 +0100
+++ b/init.d/rng-tools  Tue Dec 16 15:37:43 2014 +0100
@@ -46,14 +46,14 @@
 
        echo "(Hardware RNG device inode not found)"
        echo "$0: Cannot find a hardware RNG device to use." >&2
-       exit 1
+       return 1
 }
 
 START="--start --quiet --pidfile ${PIDFILE} --startas ${DAEMON} --name ${NAME}"
 case "$1" in
   start)
        echo -n "Starting $DESC: "
-       finddevice
+       finddevice || exit 0
        START="${START} -- -r ${HRNGDEVICE} ${RNGDOPTIONS}"
        if start-stop-daemon ${START} >/dev/null 2>&1 ; then
                echo "${NAME}."


Cheers,
Julien
-- 
Julien Cristau          <[email protected]>
Logilab                 http://www.logilab.fr/
Informatique scientifique & gestion de connaissances


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to