From 6068eb26e19970f27d6bf2ce07076852fa188d12 Mon Sep 17 00:00:00 2001 From: obrien Date: Wed, 22 Aug 2012 23:37:24 +0000 Subject: * Reinstate r128059's consumption of our best entropy first. r128060 for "hardware-supplied entropy" reversed this without reason, seems a typo. * Isolate "better than nothing" implementation to a function. Submitted by: obrien & Arthur Mesh Sponsored by: Juniper Networks --- etc/rc.d/initrandom | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'etc/rc.d') diff --git a/etc/rc.d/initrandom b/etc/rc.d/initrandom index fcc047b..49ba190 100755 --- a/etc/rc.d/initrandom +++ b/etc/rc.d/initrandom @@ -21,6 +21,17 @@ feed_dev_random() fi } +better_than_nothing() +{ + # XXX temporary until we can improve the entropy + # harvesting rate. + # Entropy below is not great, but better than nothing. + # This unblocks the generator at startup + ( ps -fauxww; sysctl -a; date; df -ib; dmesg; ps -fauxww ) \ + | dd of=/dev/random bs=8k 2>/dev/null + cat /bin/ls | dd of=/dev/random bs=8k 2>/dev/null +} + initrandom_start() { soft_random_generator=`sysctl kern.random 2>/dev/null` @@ -52,14 +63,6 @@ initrandom_start() fi fi - # XXX temporary until we can improve the entropy - # harvesting rate. - # Entropy below is not great, but better than nothing. - # This unblocks the generator at startup - ( ps -fauxww; sysctl -a; date; df -ib; dmesg; ps -fauxww ) \ - | dd of=/dev/random bs=8k 2>/dev/null - cat /bin/ls | dd of=/dev/random bs=8k 2>/dev/null - # First pass at reseeding /dev/random. # case ${entropy_file} in @@ -72,6 +75,8 @@ initrandom_start() ;; esac + better_than_nothing() + echo -n ' kickstart' fi -- cgit v1.1