summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorkstailey <kstailey@cvs.openbsd.org>1997-07-28 19:31:48 +0000
committerkstailey <kstailey@cvs.openbsd.org>1997-07-28 19:31:48 +0000
commit01c3ea700d2541a424a722cf2508d2496e051712 (patch)
treeae576d7764fe36a5015f86764b76c4ef23836d8a /etc
parentd7bfd11d0e47dfd6227b7a5ccfe2cf21dbfd43c3 (diff)
Move configuration of loopback interface to before all other interfaces.
Allows the use of local caching-only nameserver with no "nameserver" entry in /etc/resolv.conf to configure a route between the hostname and loopback.
Diffstat (limited to 'etc')
-rw-r--r--etc/netstart17
1 files changed, 8 insertions, 9 deletions
diff --git a/etc/netstart b/etc/netstart
index d70f8da4765..20a96742f48 100644
--- a/etc/netstart
+++ b/etc/netstart
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $OpenBSD: netstart,v 1.23 1997/07/25 00:06:03 provos Exp $
+# $OpenBSD: netstart,v 1.24 1997/07/28 19:31:47 kstailey Exp $
# set these to "NO" to turn them off. otherwise, they're used as flags
routed_flags=-q
@@ -64,8 +64,14 @@ else
nat=NO
fi
+# set the address for the loopback interface
+ifconfig lo0 inet localhost
-# configure all of the interfaces which we know about.
+# use loopback, not the wire
+route add $hostname localhost
+route add -net 127 127.0.0.1 -reject
+
+# configure all of the non-loopback interfaces which we know about.
# do this by reading /etc/hostname.* files, where * is the name
# of a given interface.
#
@@ -120,19 +126,12 @@ fi
done
)
-# set the address for the loopback interface
-ifconfig lo0 inet localhost
-
# /etc/mygate, if it exists, contains the name of my gateway host
# that name must be in /etc/hosts.
if [ -f /etc/mygate ]; then
route add default `cat /etc/mygate`
fi
-# use loopback, not the wire
-route add $hostname localhost
-route add -net 127 127.0.0.1 -reject
-
# default multicast route
route add -net 224.0.0.0 -interface $hostname