diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/defaults/rc.conf | 4 | ||||
-rw-r--r-- | etc/rc | 58 |
2 files changed, 12 insertions, 50 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index 47789db..816b376 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -333,8 +333,8 @@ entropy_dir="/var/db/entropy" # Set to NO to disable caching entropy via cron. entropy_save_sz="2048" # Size of the entropy cache files. entropy_save_num="8" # Number of entropy cache files to save. harvest_interrupt="YES" # Entropy device harvests interrupt randomness -harvest_ethernet="" # Entropy device harvests ethernet randomness -harvest_p_to_p="" # Entropy device harvests point-to-point randomness +harvest_ethernet="YES" # Entropy device harvests ethernet randomness +harvest_p_to_p="YES" # Entropy device harvests point-to-point randomness ############################################################## ### Define source_rc_confs, the mechanism used by /etc/rc.* ## @@ -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 |