13 start_cmd="initrandom_start"
18 if [ -f "${1}" -a -r "${1}" -a -s "${1}" ]; then
19 cat "${1}" | dd of=/dev/random bs=8k 2>/dev/null
25 soft_random_generator=`sysctl kern.random 2>/dev/null`
27 echo -n 'Entropy harvesting:'
29 if [ \! -z "${soft_random_generator}" ] ; then
31 if checkyesno harvest_interrupt; then
32 if [ -w /dev/random ]; then
33 ${SYSCTL_W} kern.random.sys.harvest.interrupt=1 >/dev/null
38 if checkyesno harvest_ethernet; then
39 if [ -w /dev/random ]; then
40 ${SYSCTL_W} kern.random.sys.harvest.ethernet=1 >/dev/null
45 if checkyesno harvest_p_to_p; then
46 if [ -w /dev/random ]; then
47 ${SYSCTL_W} kern.random.sys.harvest.point_to_point=1 >/dev/null
48 echo -n ' point_to_point'
52 # XXX temporary until we can improve the entropy
54 # Entropy below is not great, but better than nothing.
55 # This unblocks the generator at startup
56 ( ps -fauxww; sysctl -a; date; df -ib; dmesg; ps -fauxww; ) \
57 | dd of=/dev/random bs=8k 2>/dev/null
58 cat /bin/ls | dd of=/dev/random bs=8k 2>/dev/null
60 # First pass at reseeding /dev/random.
62 case ${entropy_file} in
66 if [ -w /dev/random ]; then
67 feed_dev_random "${entropy_file}"