diff options
author | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-03-14 02:29:34 +0000 |
---|---|---|
committer | Kenneth R Westerback <krw@cvs.openbsd.org> | 2005-03-14 02:29:34 +0000 |
commit | e85f049c84e12c7d89383fb3d973244d90b82559 (patch) | |
tree | 3dd7f2793e5bdd3411525697a559bd9ca60f9c9d /distrib/miniroot/install.sub | |
parent | fa34d31dd311765edf9fcc66506c4df446e394b1 (diff) |
Present list of dns servers supplied by dhcp as blank separated list,
not newline separted list.
Spotted by & ok deraadt@.
Diffstat (limited to 'distrib/miniroot/install.sub')
-rw-r--r-- | distrib/miniroot/install.sub | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index ea2a4b635e6..8ebe0a7dbd7 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,4 +1,4 @@ -# $OpenBSD: install.sub,v 1.362 2005/03/08 17:56:00 deraadt Exp $ +# $OpenBSD: install.sub,v 1.363 2005/03/14 02:29:33 krw Exp $ # $NetBSD: install.sub,v 1.5.2.8 1996/09/02 23:25:02 pk Exp $ # # Copyright (c) 1997-2005 Todd Miller, Theo de Raadt, Ken Westerback @@ -1429,7 +1429,7 @@ get_fqdn() { } donetconfig() { - local _dn _ns + local _dn _ns _n configure_ifs @@ -1440,8 +1440,13 @@ donetconfig() { # or not, during the rest of the install. if [ -f /tmp/resolv.conf.shadow ]; then mv /tmp/resolv.conf.shadow /tmp/resolv.conf - # Get nameserver address(es). - _ns=$(sed -ne '/^nameserver /s///p' /tmp/resolv.conf) + # Get nameserver address(es). Store as a blank separated list. + for _n in $(grep '^nameserver ' /tmp/resolv.conf); do + [[ $_n == nameserver ]] || _ns="$_ns$_n " + done + # Zap trailing space in _ns. + set -- $_ns + _ns=$* # Get default fully qualified domain name from *first* domain # given on *last* search or domain statement. _dn=$(sed -n \ |