Solved [Solved] rc.conf and kern.random.sys.harvest

In rc.conf() can be read that these options can be set
Code:
harvest_interrupt
harvest_ethernet
harvest_p_to_p
On the other hand these values are sysctl() defaults:
Code:
# sysctl kern.random.sys
kern.random.sys.seeded: 1
kern.random.sys.harvest.ethernet: 1
kern.random.sys.harvest.point_to_point: 1
kern.random.sys.harvest.interrupt: 1
kern.random.sys.harvest.swi: 1
I’m not sure what the purpose of the options in /etc/rc.conf are. Do they have to be set YES for being activated? Or are they just a way for disabling them?
 
Re: rc.conf and kern.random.sys.harvest

From /etc/rc.d/initrandom:

Code:
                        if checkyesno harvest_ethernet; then
                                ${SYSCTL} kern.random.sys.harvest.ethernet=1 >/dev/null
                                echo -n ' ethernet'
                        else
                                ${SYSCTL} kern.random.sys.harvest.ethernet=0 >/dev/null
                        fi

So
Code:
harvest_ethernet="YES"
sets the sysctl to 1, and no sets it to 0. Same for the others

/etc/defaults/rc.conf, which is used unless overridden by /etc/rc.conf, turns them all on by default, so you only really need to put these in /etc/rc.conf if you want to turn them off.

/etc/defaults/rc.conf:
Code:
harvest_interrupt="YES" # Entropy device harvests interrupt randomness
harvest_ethernet="YES"  # Entropy device harvests ethernet randomness
harvest_p_to_p="YES"    # Entropy device harvests point-to-point randomness
 
Re: rc.conf and kern.random.sys.harvest

I obviously had forgotten the existence of /etc/defaults/rc.conf. Thanks for the reminder! :)
 
Back
Top