From 1c72742bca7e8e5e6151c77481e9110f6b8a1cf4 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Sun, 2 Feb 2014 12:50:22 +0100 Subject: [PATCH] krng: use kernel entropy if no random-seed is stored. --- src/initscripts/init.d/random | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/initscripts/init.d/random b/src/initscripts/init.d/random index 26c64e3b34..7159b53860 100644 --- a/src/initscripts/init.d/random +++ b/src/initscripts/init.d/random @@ -13,6 +13,9 @@ case "$1" in boot_mesg "Initializing kernel random number generator..." if [ -f /var/tmp/random-seed ]; then /bin/cat /var/tmp/random-seed >/dev/urandom + else + /bin/dd if=/dev/random of=/dev/urandom \ + count=1 &>/dev/null fi /bin/dd if=/dev/urandom of=/var/tmp/random-seed \ count=1 &>/dev/null