rng-tools: start rngd early enough to actually be useful
authorPhilip Prindeville <philipp@redfish-solutions.com>
Fri, 3 Feb 2017 04:56:35 +0000 (21:56 -0700)
committerHannu Nyman <hannu.nyman@iki.fi>
Fri, 3 Feb 2017 10:52:51 +0000 (12:52 +0200)
commit3d4048bd9fbc7bc5a19ab017aa020ab4ff881d29
treedd1c35e7569ddfb0845d86282987da38fd56091d
parent5c749ad53ed466c0fb1b981a0f662bd0f4dec5c4
rng-tools: start rngd early enough to actually be useful

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>
(cherry picked from commit 901ef617c7c913e94cfa88a5427d4a5511129fc8)
utils/rng-tools/files/rngd.init