diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2001-10-31 01:33:25 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2001-10-31 01:33:25 +0000 |
commit | 45c5bc2d584f41fd64f0d1053a12cb4130ef8305 (patch) | |
tree | 7a16d04dce654c1b9442f4b9adb9959d4441ad7b | |
parent | f3dcc493b102b347d3d11da3408e5614109588cf (diff) |
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/ .*//'` |