DragonFly BSD
DragonFly submit List (threaded) for 2004-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

rndcontrol rc


From: Peter Avalos <pavalos@xxxxxxxxxxxx>
Date: Sun, 11 Jul 2004 21:49:56 -0700

With the import of RCNG, I believe rndcontrol was forgotten since FBSD5
doesn't use it any more.  Here's an rc.d file and a modification to
rc.conf that will bring back the functionality that was in FBSD4.

--Pete
--- /etc/defaults/rc.conf	2004-04-19 01:12:52.000000000 -0700
+++ rc.conf	2004-07-11 21:44:54.000000000 -0700
@@ -420,11 +420,7 @@
 update_motd="YES"	# update version info in /etc/motd (or NO)
 start_vinum="NO"	# set to YES to start vinum
 unaligned_print="YES"	# print unaligned access warnings on the alpha (or NO).
-entropy_file="/entropy"	# Set to NO to disable caching entropy through reboots.
-			# /var/db/entropy is preferred if / is not available.
-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.
+rand_irqs="NO"		# Stir the entropy pool (like "5 11" or NO).
 dmesg_enable="YES"	# Save dmesg(8) to /var/run/dmesg.boot
 jail_enable="NO"	# Set to NO to disable starting of any jails
 jail_list=""		# Space separated list of names of jails
#!/bin/sh
#
# $DragonFly$
#

# PROVIDE: rndcontrol
# REQUIRE: DAEMON
# BEFORE:  LOGIN
# KEYWORD: DragonFly

.  /etc/rc.subr

name="rndcontrol"
start_cmd="rand_start"

rand_start()
{
	# interrupts for /dev/random device
	#
	case ${rand_irqs} in
	[Nn][Oo] | '')
		;;
	*)
		echo -n 'entropy IRQs:'
		for irq in ${rand_irqs}; do
			echo -n " ${irq}" && rndcontrol -q -s ${irq}
		done
		echo '.'
		;;
	esac
}


load_rc_config $name
run_rc_command "$1"


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]