summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--distrib/miniroot/install.sh8
-rw-r--r--etc/rc12
2 files changed, 9 insertions, 11 deletions
diff --git a/distrib/miniroot/install.sh b/distrib/miniroot/install.sh
index 2a9eb2d1244..a6292da52a3 100644
--- a/distrib/miniroot/install.sh
+++ b/distrib/miniroot/install.sh
@@ -1,5 +1,5 @@
#!/bin/ksh
-# $OpenBSD: install.sh,v 1.210 2010/10/30 22:48:03 deraadt Exp $
+# $OpenBSD: install.sh,v 1.211 2010/12/22 18:13:15 deraadt Exp $
# $NetBSD: install.sh,v 1.5.2.8 1996/08/27 18:15:05 gwr Exp $
#
# Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback
@@ -272,11 +272,11 @@ for _f in fstab hostname* kbdtype my* ttys *.conf *.tail; do
done )
# Feed the random pool some junk before we read from it
-dmesg >/dev/urandom
-cat $SERVERLISTALL >/dev/urandom 2>/dev/null
+dmesg >/dev/arandom
+cat $SERVERLISTALL >/dev/arandom 2>/dev/null
echo -n "done.\nGenerating initial host.random file..."
-/mnt/bin/dd if=/mnt/dev/urandom of=/mnt/var/db/host.random \
+/mnt/bin/dd if=/dev/arandom of=/mnt/var/db/host.random \
bs=1024 count=64 >/dev/null 2>&1
chmod 600 /mnt/var/db/host.random >/dev/null 2>&1
echo "done."
diff --git a/etc/rc b/etc/rc
index 369cb4aa14b..a065532ae85 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,4 +1,4 @@
-# $OpenBSD: rc,v 1.345 2010/11/08 19:44:36 ajacoutot Exp $
+# $OpenBSD: rc,v 1.346 2010/12/22 18:13:14 deraadt Exp $
# System startup script run by init on autoboot
# or after single-user.
@@ -102,14 +102,12 @@ wsconsctl_conf()
random_seed()
{
if [ -f /var/db/host.random -a "X$random_seed_done" = "X" ]; then
- dd if=/var/db/host.random of=/dev/urandom bs=1024 count=64 \
- > /dev/null 2>&1
dd if=/var/db/host.random of=/dev/arandom bs=1024 count=64 \
> /dev/null 2>&1
# reset seed file, so that if a shutdown-less reboot occurs,
# the next seed is not a repeat
- dd if=/dev/urandom of=/var/db/host.random bs=1024 count=64 \
+ dd if=/dev/arandom of=/var/db/host.random bs=1024 count=64 \
> /dev/null 2>&1
random_seed_done=1
@@ -161,7 +159,7 @@ export PATH
. /etc/rc.conf
if [ X"$1" = X"shutdown" ]; then
- dd if=/dev/urandom of=/var/db/host.random bs=1024 count=64 >/dev/null 2>&1
+ dd if=/dev/arandom of=/var/db/host.random bs=1024 count=64 >/dev/null 2>&1
chmod 600 /var/db/host.random >/dev/null 2>&1
if [ $? -eq 0 -a -f /etc/rc.shutdown ]; then
echo /etc/rc.shutdown in progress...
@@ -310,9 +308,9 @@ fi
mount -s /usr >/dev/null 2>&1
mount -s /var >/dev/null 2>&1
-# if there's no /var/db/host.random, make one through /dev/urandom
+# if there's no /var/db/host.random, use /dev/arandom to create one
if [ ! -f /var/db/host.random ]; then
- dd if=/dev/urandom of=/var/db/host.random bs=1024 count=64 \
+ dd if=/dev/arandom of=/var/db/host.random bs=1024 count=64 \
>/dev/null 2>&1
chmod 600 /var/db/host.random >/dev/null 2>&1
else