Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Jan 2001 15:33:36 -0700
From:      Warner Losh <imp@harmony.village.org>
To:        Matt Dillon <dillon@earth.backplane.com>
Cc:        Mark Murray <mark@grondar.za>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/etc crontab rc src/etc/defaults rc.conf src/etc/mtree BSD.root.dist src/libexec Makefile src/libexec/save-entropy Makefile save-entropy.sh 
Message-ID:  <200101112233.f0BMXas75362@harmony.village.org>
In-Reply-To: Your message of "Thu, 11 Jan 2001 14:11:16 PST." <200101112211.f0BMBGp75183@earth.backplane.com> 
References:  <200101112211.f0BMBGp75183@earth.backplane.com>  <200101111901.f0BJ1jU72510@earth.backplane.com> <200101112033.f0BKXtI10390@gratis.grondar.za> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <200101112211.f0BMBGp75183@earth.backplane.com> Matt Dillon writes:
:     If nobody posts that they've fixed it by the time I get home, between
:     7-8 p.m. PST, I will throw together and test a patch.  I'm not happy
:     that I have to be the one to do it, but I'll do it.

Well, I believe that this patch that would solve the dependency
issues.  I didn't solve the /var/db/entropy was hard wired issues,
however, but that can be dealt with separately.

Warner

Index: rc
===================================================================
RCS file: /home/imp/FreeBSD/CVS/src/etc/rc,v
retrieving revision 1.244
diff -u -r1.244 rc
--- rc	2000/12/17 08:24:49	1.244
+++ rc	2001/01/11 22:32:07
@@ -98,22 +98,8 @@
 chkdepend amd amd_enable        portmap portmap_enable
 chkdepend NFS nfs_server_enable portmap portmap_enable
 
-# First pass at entropy recovery so the rebooting /dev/random can reseed.
-#
-case ${entropy_file} in
-[Nn][Oo] | '')
-	;;
-*)
-	if [ -w /dev/random ]; then
-		if [ -f "${entropy_file}" -a -r "${entropy_file}" -a \
-		    -s "${entropy_file}" ]; then
-			echo "Using ${entropy_file} as an entropy file"
-			cat ${entropy_file} > /dev/random 2> /dev/random
-			entropy_reseeded=yes
-		fi
-	fi
-	;;
-esac
+date > /dev/random 2> /dev/random
+cat /bin/ls > /dev/random 2> /dev/random
 
 # Configure ccd devices.
 #
@@ -206,39 +192,33 @@
 
 # Second attempt at reseeding, if needed.
 #
-case ${entropy_reseeded} in
-yes)
+case ${entropy_file} in
+[Nn][Oo] | '')
 	;;
 *)
-	case ${entropy_file} in
-	[Nn][Oo] | '')
-		;;
-	*)
-		if [ -w /dev/random ]; then
-			if [ -f "${entropy_file}" -a -r "${entropy_file}" -a \
-			    -s "${entropy_file}" ]; then
-				echo "Using ${entropy_file} as an entropy file"
-				cat ${entropy_file} > /dev/random 2> /dev/random
-			elif [ "${entropy_file}" != /var/db/entropy -a \
-			    -f /var/db/entropy -a -r /var/db/entropy -a \
-			    -s /var/db/entropy ]; then
-				echo 'Using /var/db/entropy as an entropy file'
-				cat /var/db/entropy > /dev/random 2> /dev/random
-			else
+	if [ -w /dev/random ]; then
+		if [ -f "${entropy_file}" -a -r "${entropy_file}" -a \
+		    -s "${entropy_file}" ]; then
+			echo "Using ${entropy_file} as an entropy file"
+			cat ${entropy_file} > /dev/random 2> /dev/random
+		elif [ "${entropy_file}" != /var/db/entropy -a \
+		    -f /var/db/entropy -a -r /var/db/entropy -a \
+		    -s /var/db/entropy ]; then
+			echo 'Using /var/db/entropy as an entropy file'
+			cat /var/db/entropy > /dev/random 2> /dev/random
+		else
     echo "Can't use ${entropy_file} as an entropy file, trying other sources"
-				# XXX temporary until we can get the entropy
-				# harvesting rate up
-				# Entropy below is not great,
-				# but better than nothing.
-				(ps -gauxwww; iostat; vmstat; sysctl -a;
-				    dmesg) | /bin/dd of=/dev/random bs=8k 2>/dev/null
-				( for i in /etc /var/run ; do
-					cd $i ; ls -al ; cat *
-				done ) | /bin/dd of=/dev/random bs=8k 2>/dev/null
-			fi
+			# XXX temporary until we can get the entropy
+			# harvesting rate up
+			# Entropy below is not great,
+			# but better than nothing.
+			(ps -gauxwww; iostat; vmstat; sysctl -a;
+			    dmesg) | /bin/dd of=/dev/random bs=8k 2>/dev/null
+			( for i in /etc /var/run ; do
+				cd $i ; ls -al ; cat *
+			done ) | /bin/dd of=/dev/random bs=8k 2>/dev/null
 		fi
-		;;
-	esac
+	fi
 	;;
 esac
 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200101112233.f0BMXas75362>