diff options
author | ru <ru@FreeBSD.org> | 2008-04-22 15:18:47 +0000 |
---|---|---|
committer | ru <ru@FreeBSD.org> | 2008-04-22 15:18:47 +0000 |
commit | cbed991ad4b1e8317813c9f4a25ff225a1da3c8a (patch) | |
tree | 7357434affa554841a1be40fbdd831538cff54b4 /etc | |
parent | 057cb45df39a212c08811419e80c0100802f22c4 (diff) | |
download | FreeBSD-src-cbed991ad4b1e8317813c9f4a25ff225a1da3c8a.zip FreeBSD-src-cbed991ad4b1e8317813c9f4a25ff225a1da3c8a.tar.gz |
Make it possible to disable sources of entropy harvesting.
Noticed by: Igor Sysoev
MFC after: 3 days
Diffstat (limited to 'etc')
-rw-r--r-- | etc/rc.d/initrandom | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/etc/rc.d/initrandom b/etc/rc.d/initrandom index fb15064..8802396 100644 --- a/etc/rc.d/initrandom +++ b/etc/rc.d/initrandom @@ -28,24 +28,26 @@ initrandom_start() if [ \! -z "${soft_random_generator}" ] ; then - if checkyesno harvest_interrupt; then - if [ -w /dev/random ]; then + if [ -w /dev/random ]; then + if checkyesno harvest_interrupt; then ${SYSCTL_W} kern.random.sys.harvest.interrupt=1 >/dev/null echo -n ' interrupts' + else + ${SYSCTL_W} kern.random.sys.harvest.interrupt=0 >/dev/null fi - fi - if checkyesno harvest_ethernet; then - if [ -w /dev/random ]; then + if checkyesno harvest_ethernet; then ${SYSCTL_W} kern.random.sys.harvest.ethernet=1 >/dev/null echo -n ' ethernet' + else + ${SYSCTL_W} kern.random.sys.harvest.ethernet=0 >/dev/null fi - fi - if checkyesno harvest_p_to_p; then - if [ -w /dev/random ]; then - ${SYSCTL_W} kern.random.sys.harvest.point_to_point=1 >/dev/null + if checkyesno harvest_p_to_p; then + ${SYSCTL_W} kern.random.sys.harvest.point_to_point=1 >/dev/null echo -n ' point_to_point' + else + ${SYSCTL_W} kern.random.sys.harvest.point_to_point=0 >/dev/null fi fi |