From 3d4048bd9fbc7bc5a19ab017aa020ab4ff881d29 Mon Sep 17 00:00:00 2001 From: Philip Prindeville Date: Thu, 2 Feb 2017 21:56:35 -0700 Subject: [PATCH] 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 (cherry picked from commit 901ef617c7c913e94cfa88a5427d4a5511129fc8) --- utils/rng-tools/files/rngd.init | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/rng-tools/files/rngd.init b/utils/rng-tools/files/rngd.init index c9cead3bc8..bb560c8b19 100644 --- a/utils/rng-tools/files/rngd.init +++ b/utils/rng-tools/files/rngd.init @@ -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