diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-09-28 12:34:52 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-09-28 12:34:52 +0000 |
commit | c304c69309272d274e421da6aeab33ce43ce6674 (patch) | |
tree | 31588dd8fd68982306c8136ec552726b9e47b8f9 | |
parent | 1867f0481ae9c390bfabc4d81443696e01e4add0 (diff) |
fix resolver setup
-rw-r--r-- | distrib/miniroot/install.sh | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/distrib/miniroot/install.sh b/distrib/miniroot/install.sh index 77fa9d6dad2..0ef7a969e9e 100644 --- a/distrib/miniroot/install.sh +++ b/distrib/miniroot/install.sh @@ -1,5 +1,5 @@ #!/bin/sh -# $OpenBSD: install.sh,v 1.34 1998/09/28 12:34:06 deraadt Exp $ +# $OpenBSD: install.sh,v 1.35 1998/09/28 12:34:51 deraadt Exp $ # $NetBSD: install.sh,v 1.5.2.8 1996/08/27 18:15:05 gwr Exp $ # # Copyright (c) 1997,1998 Todd Miller, Theo de Raadt @@ -418,33 +418,33 @@ case "$resp" in fi fi - ns="none" + resp="none" if [ -f /etc/resolv.conf ]; then - ns="" + resp="" for n in `grep '^nameserver ' /etc/resolv.conf | \ sed -e 's/^nameserver //'`; do - if [ "X${ns}" = "X" ]; then - ns="$n" + if [ "X${resp}" = "X" ]; then + resp="$n" else - ns="$ns $n" + resp="$resp $n" fi done elif [ -f /tmp/resolv.conf ]; then - ns="" + resp="" for n in `grep '^nameserver ' /tmp/resolv.conf | \ sed -e 's/^nameserver //'`; do - if [ "X${ns}" = "X" ]; then - ns="$n" + if [ "X${resp}" = "X" ]; then + resp="$n" else - ns="$ns $n" + resp="$resp $n" fi done fi - echo -n "Enter IP address of primary nameserver: [$ns] " - getresp "$ns" - if [ "X${ns}" != X"none" ]; then + echo -n "Enter IP address of primary nameserver: [$resp] " + getresp "$resp" + if [ "X${resp}" != X"none" ]; then echo "search $FQDN" >> /tmp/resolv.conf - for n in `echo ${ns}`; do + for n in `echo ${resp}`; do echo "nameserver $n" >> /tmp/resolv.conf done echo "lookup file bind" >> /tmp/resolv.conf |