6 # PROVIDE: preseedrandom
11 if [ -f "${1}" -a -r "${1}" -a -s "${1}" ]; then
12 cat "${1}" | dd of=/dev/random bs=8k 2>/dev/null
16 soft_random_generator=`sysctl kern.random 2>/dev/null`
18 if [ -n "${soft_random_generator}" ] ; then
20 echo -n 'Pre-seeding PRNG:'
22 # XXX temporary until we can improve the entropy
24 # Entropy below is not great, but better than nothing.
25 # This unblocks the generator at startup
26 ( ps -fauxww; sysctl -a; date; df -ib; dmesg; ps -fauxww; ) \
27 | dd of=/dev/random bs=8k 2>/dev/null
28 cat /bin/ls | dd of=/dev/random bs=8k 2>/dev/null
30 # First pass at reseeding /dev/random.
32 if [ -w /dev/random ]; then
33 feed_dev_random "/entropy"