From owner-cvs-all Thu Jan 11 14:34:31 2001 Delivered-To: cvs-all@freebsd.org Received: from harmony.village.org (rover.village.org [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id D671837B69B; Thu, 11 Jan 2001 14:33:52 -0800 (PST) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.11.1/8.11.1) with ESMTP id f0BMXas75362; Thu, 11 Jan 2001 15:33:36 -0700 (MST) (envelope-from imp@harmony.village.org) Message-Id: <200101112233.f0BMXas75362@harmony.village.org> To: Matt Dillon 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 Cc: Mark Murray , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.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> Date: Thu, 11 Jan 2001 15:33:36 -0700 From: Warner Losh Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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