diff options
Diffstat (limited to 'etc/rc')
-rw-r--r-- | etc/rc | 58 |
1 files changed, 10 insertions, 48 deletions
@@ -123,34 +123,11 @@ case ${harvest_interrupt} in ;; esac -# Steal some code from rc.network to help determine what to enable. -case ${network_interfaces} in -[Aa][Uu][Tt][Oo]) - h_network_interfaces="`ifconfig -l`" - ;; -*) - h_network_interfaces="${network_interfaces}" - ;; -esac - case ${harvest_ethernet} in [Nn][Oo]) ;; *) - do_ether_harvest='' - - for h_ifn in ${h_network_interfaces}; do - eval h_ifconfig_args=\$ifconfig_${h_ifn} - case ${h_ifconfig_args} in - '') - ;; - *) - do_ether_harvest=1 - ;; - esac - done - - if [ -w /dev/random -a "${do_ether_harvest}" ]; then + if [ -w /dev/random ]; then /sbin/sysctl -w kern.random.sys.harvest_ethernet=1 >/dev/null echo -n ' ethernet' fi @@ -161,22 +138,7 @@ case ${harvest_p_to_p} in [Nn][Oo]) ;; *) - do_p_to_p_harvest='' - - # Other than user ppp, tun* will already exist - case "${h_network_interfaces}" in - *tun0*) - do_p_to_p_harvest=1 - ;; - esac - - case ${ppp_enable} in - [Yy][Ee][Ss]) - do_p_to_p_harvest=1 - ;; - esac - - if [ -w /dev/random -a "${do_p_to_p_harvest}" ]; then + if [ -w /dev/random ]; then /sbin/sysctl -w kern.random.sys.harvest_point_to_point=1 >/dev/null echo -n ' point_to_point' fi @@ -187,14 +149,6 @@ echo '.' # First pass at reseeding /dev/random. # -# XXX temporary until we can get the entropy -# harvesting rate up -# Entropy below is not great, -# but better than nothing. -( ps -efauxww; sysctl -a; date; df -ib; dmesg; ps -efauxww; ) \ - | dd of=/dev/random bs=8k 2>/dev/null -cat /bin/ls | dd of=/dev/random bs=8k 2>/dev/null - case ${entropy_file} in [Nn][Oo] | '') ;; @@ -205,6 +159,14 @@ case ${entropy_file} in ;; esac +# XXX temporary until we can get the entropy +# harvesting rate up +# Entropy below is not great, +# but better than nothing. +( ps -efauxww; sysctl -a; date; df -ib; dmesg; ps -efauxww; ) \ + | dd of=/dev/random bs=8k 2>/dev/null +cat /bin/ls | dd of=/dev/random bs=8k 2>/dev/null + # Configure ccd devices. # if [ -r /etc/ccd.conf ]; then |