rng-tools: start rngd early enough to actually be useful 3949/head
authorPhilip Prindeville <philipp@redfish-solutions.com>
Fri, 3 Feb 2017 04:56:35 +0000 (21:56 -0700)
committerPhilip Prindeville <philipp@redfish-solutions.com>
Fri, 3 Feb 2017 05:52:50 +0000 (22:52 -0700)
lighttpd starts at priority 50, but promptly calls getrandom() on
initialization (li_rand_reseed() and li_rand_device_bytes() from
server_init()). If /dev/urandom (which getrandom() uses by default)
doesn't have sufficient entropy, this will block.

Since Openwrt runs the startup scripts serially, this can block
initialization indefinitely.  I've seen 15-20 minutes typically.

Seeding the pool early on can quickly built sufficient entropy to
complete booting without blocking.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
utils/rng-tools/files/rngd.init

index c9cead3bc8fc730fc4e88b3c69e6f45ae4f2155b..bb560c8b19c8b0aabc4ac5412e5c73cd58c07425 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/sh /etc/rc.common
 # Copyright (C) 2011-2014 OpenWrt.org
 
-START=98
+START=25
 
 USE_PROCD=1
 PROG=/sbin/rngd