initrandom (208307) | initrandom (220153) |
---|---|
1#!/bin/sh 2# | 1#!/bin/sh 2# |
3# $FreeBSD: head/etc/rc.d/initrandom 208307 2010-05-19 19:03:19Z dougb $ | 3# $FreeBSD: head/etc/rc.d/initrandom 220153 2011-03-30 01:19:00Z emaste $ |
4# 5 6# PROVIDE: initrandom 7# REQUIRE: dumpon ddb 8# BEFORE: disks 9# KEYWORD: nojail 10 11. /etc/rc.subr --- 14 unchanged lines hidden (view full) --- 26 soft_random_generator=`sysctl kern.random 2>/dev/null` 27 28 echo -n 'Entropy harvesting:' 29 30 if [ \! -z "${soft_random_generator}" ] ; then 31 32 if [ -w /dev/random ]; then 33 if checkyesno harvest_interrupt; then | 4# 5 6# PROVIDE: initrandom 7# REQUIRE: dumpon ddb 8# BEFORE: disks 9# KEYWORD: nojail 10 11. /etc/rc.subr --- 14 unchanged lines hidden (view full) --- 26 soft_random_generator=`sysctl kern.random 2>/dev/null` 27 28 echo -n 'Entropy harvesting:' 29 30 if [ \! -z "${soft_random_generator}" ] ; then 31 32 if [ -w /dev/random ]; then 33 if checkyesno harvest_interrupt; then |
34 ${SYSCTL_W} kern.random.sys.harvest.interrupt=1 >/dev/null | 34 ${SYSCTL} kern.random.sys.harvest.interrupt=1 >/dev/null |
35 echo -n ' interrupts' 36 else | 35 echo -n ' interrupts' 36 else |
37 ${SYSCTL_W} kern.random.sys.harvest.interrupt=0 >/dev/null | 37 ${SYSCTL} kern.random.sys.harvest.interrupt=0 >/dev/null |
38 fi 39 40 if checkyesno harvest_ethernet; then | 38 fi 39 40 if checkyesno harvest_ethernet; then |
41 ${SYSCTL_W} kern.random.sys.harvest.ethernet=1 >/dev/null | 41 ${SYSCTL} kern.random.sys.harvest.ethernet=1 >/dev/null |
42 echo -n ' ethernet' 43 else | 42 echo -n ' ethernet' 43 else |
44 ${SYSCTL_W} kern.random.sys.harvest.ethernet=0 >/dev/null | 44 ${SYSCTL} kern.random.sys.harvest.ethernet=0 >/dev/null |
45 fi 46 47 if checkyesno harvest_p_to_p; then | 45 fi 46 47 if checkyesno harvest_p_to_p; then |
48 ${SYSCTL_W} kern.random.sys.harvest.point_to_point=1 >/dev/null | 48 ${SYSCTL} kern.random.sys.harvest.point_to_point=1 >/dev/null |
49 echo -n ' point_to_point' 50 else | 49 echo -n ' point_to_point' 50 else |
51 ${SYSCTL_W} kern.random.sys.harvest.point_to_point=0 >/dev/null | 51 ${SYSCTL} kern.random.sys.harvest.point_to_point=0 >/dev/null |
52 fi 53 fi 54 55 # XXX temporary until we can improve the entropy 56 # harvesting rate. 57 # Entropy below is not great, but better than nothing. 58 # This unblocks the generator at startup 59 ( ps -fauxww; sysctl -a; date; df -ib; dmesg; ps -fauxww ) \ --- 23 unchanged lines hidden --- | 52 fi 53 fi 54 55 # XXX temporary until we can improve the entropy 56 # harvesting rate. 57 # Entropy below is not great, but better than nothing. 58 # This unblocks the generator at startup 59 ( ps -fauxww; sysctl -a; date; df -ib; dmesg; ps -fauxww ) \ --- 23 unchanged lines hidden --- |