summaryrefslogtreecommitdiff
path: root/distrib/miniroot
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-09-25 02:23:53 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-09-25 02:23:53 +0000
commitd05b62af8f92b51c251ee44a71cfd36e0cb39a60 (patch)
treeb5611a6f0b3499eef91ae6fa5020f0c94a7c1428 /distrib/miniroot
parent0b129b75348a0388243b2f98d3a03c907b30391e (diff)
multiple IP addresses permitted for DNS servers
Diffstat (limited to 'distrib/miniroot')
-rw-r--r--distrib/miniroot/install.sh29
1 files changed, 18 insertions, 11 deletions
diff --git a/distrib/miniroot/install.sh b/distrib/miniroot/install.sh
index e8ee8c88046..967464e628b 100644
--- a/distrib/miniroot/install.sh
+++ b/distrib/miniroot/install.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: install.sh,v 1.31 1998/09/24 21:52:10 deraadt Exp $
+# $OpenBSD: install.sh,v 1.32 1998/09/25 02:23:52 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
@@ -368,20 +368,27 @@ case "$resp" in
fi
fi
- resp="none"
+ ns="none"
if [ -f /etc/resolv.conf ]; then
- resp=`grep '^nameserver ' /etc/resolv.conf | \
- sed -e 's/^nameserver //' | sed -e '1q'`
+ ns=""
+ for n in `grep '^nameserver ' /etc/resolv.conf | \
+ sed -e 's/^nameserver //'`; do
+ ns="$ns $n"
+ done
elif [ -f /tmp/resolv.conf ]; then
- resp=`grep '^nameserver ' /tmp/resolv.conf | \
- sed -e 's/^nameserver //' | sed -e '1q'`
+ ns=""
+ for n in `grep '^nameserver ' /tmp/resolv.conf | \
+ sed -e 's/^nameserver //'`; do
+ ns="$ns $n"
+ done
fi
- echo -n "Enter IP address of primary nameserver: [$resp] "
- getresp "$resp"
- if [ "X${resp}" != X"none" ]; then
- echo "domain $FQDN" > /tmp/resolv.conf
- echo "nameserver $resp" >> /tmp/resolv.conf
+ echo -n "Enter IP address of primary nameserver: [$ns] "
+ getresp "$ns"
+ if [ "X${ns}" != X"none" ]; then
echo "search $FQDN" >> /tmp/resolv.conf
+ for n in `echo ${ns}`; do
+ echo "nameserver $n" >> /tmp/resolv.conf
+ done
echo "lookup file bind" >> /tmp/resolv.conf
echo -n "Would you like to use the nameserver now? [y] "