diff options
author | 2001-10-31 01:33:24 +0000 | |
---|---|---|
committer | 2001-10-31 01:33:24 +0000 | |
commit | 18e8263b9adf254edd38f6f2340f0fbeb4487ab3 (patch) | |
tree | 58733e526687c2e3baa869015a654bfe7863dcd6 | |
parent | Add note to BUGS section regarding linking with -ggdb vs -g (diff) | |
download | wireguard-openbsd-18e8263b9adf254edd38f6f2340f0fbeb4487ab3.tar.xz wireguard-openbsd-18e8263b9adf254edd38f6f2340f0fbeb4487ab3.zip |
Fix creation of /etc/hosts file in install.
Obtaining the FQDN *after* calling configurenetwork(), so that
DHCP info can be used, turns out to not be a good idea because
/etc/hosts is created in configurenetwork().
As a result the /etc/hosts created by the 3.0 install script
contains bogus entries with a '.' instead of '.<domain name>'.
So, put configurenetwork() back where it was pre-3.0, i.e. after
FQDN is determined.
Noticed by David Krause (PR#2155).
Other /etc/hosts issues (including David's ipv6 suggestion) under
investigation.
-rw-r--r-- | distrib/miniroot/install.sub | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index efcd3d97011..b514d2e2b4b 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: install.sub,v 1.170 2001/10/15 22:58:59 krw Exp $ +# $OpenBSD: install.sub,v 1.171 2001/10/31 01:33:24 krw Exp $ # $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $ # # Copyright (c) 1997,1998 Todd Miller, Theo de Raadt @@ -2248,9 +2248,7 @@ donetconfig() { echo "any name servers." echo - configurenetwork - - # Get FQDN after possible DHCP invocation + # Get FQDN before creation of hosts file entries in addhostent() if [ -f /tmp/resolv.conf.shadow ]; then get_fqdn /tmp/resolv.conf.shadow else @@ -2258,6 +2256,8 @@ donetconfig() { get_fqdn /tmp/resolv.conf fi + configurenetwork + resp=`route -n show | grep '^default' | sed -e 's/^default //' -e 's/ .*//'` |