summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>1998-07-03 03:48:17 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>1998-07-03 03:48:17 +0000
commitd60054f71d5bf8baf7198aef14a4f599c82545a0 (patch)
treec9765d9c90266259cc5b0ff4054af52325c05ea4
parenta05783f4c321f76bddf5693c2ba20bad8a1f5c8c (diff)
Generate an /etc/host.random if it doesn't exist; 64KB, perms 600.
-rw-r--r--etc/rc8
1 files changed, 7 insertions, 1 deletions
diff --git a/etc/rc b/etc/rc
index fe612f86390..39ca38c3dcd 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,4 +1,4 @@
-# $OpenBSD: rc,v 1.76 1998/06/13 03:38:15 millert Exp $
+# $OpenBSD: rc,v 1.77 1998/07/03 03:48:16 angelos Exp $
# System startup script run by init on autoboot
# or after single-user.
@@ -70,6 +70,12 @@ rm -f /fastboot # XXX (root now writeable)
echo 'setting tty flags'
ttyflags -a
+# if there's no /etc/host.random, make one through /dev/urandom
+if [ ! -f /etc/host.random ]; then
+ dd if=/dev/urandom of=/dev/host.random bs=1024 count=64
+ chmod 600 /etc/random
+fi
+
# set hostname, turn on network
echo 'starting network'
. /etc/netstart