From a2422ae3f47fe3e5af45b2d94d60f6f83e40d996 Mon Sep 17 00:00:00 2001 From: krw <> Date: Sun, 16 Feb 2003 23:25:40 +0000 Subject: [PATCH] Fix up some DNS verbiage to make it consistant. Fix up default route selection by a) Forcing user to explicitly chose 'dhcp' as a mechanism for specifying a default route, rather than guessing based on one or more interfaces being configured by dhcp. b) If the user specified default route does not work, re-present the existing default route rather than losing it. c) Move default route selection to after nameserver activation so the user can specify a hostname as the default route. Change /etc/netstart so that /etc/mygate wins if a default route was already specified (i.e. by dhcp). ok deraadt@. --- src/etc/netstart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/etc/netstart b/src/etc/netstart index 824ee856..6ccb0f28 100644 --- a/src/etc/netstart +++ b/src/etc/netstart @@ -1,6 +1,6 @@ #!/bin/sh - # -# $OpenBSD: netstart,v 1.85 2002/05/16 20:48:25 todd Exp $ +# $OpenBSD: netstart,v 1.86 2003/02/16 23:25:40 krw Exp $ # Returns true if $1 contains only alphanumerics isalphanumeric() { @@ -275,6 +275,7 @@ fi # /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 delete default > /dev/null 2>&1 route -n add -host default `cat /etc/mygate` fi