summaryrefslogtreecommitdiff
path: root/distrib/miniroot
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-09-24 21:52:11 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-09-24 21:52:11 +0000
commit7d0497233ef8db5faaebdba2420277e8b0de3cde (patch)
treed062a9e4e08a8eccdb4e649c194f4b17bcf88662 /distrib/miniroot
parentb4dc4abca196544c2e04e9aafeb22e4d027b498a (diff)
parse /etc/resolv.conf if it exists...
Diffstat (limited to 'distrib/miniroot')
-rw-r--r--distrib/miniroot/install.sh9
1 files changed, 6 insertions, 3 deletions
diff --git a/distrib/miniroot/install.sh b/distrib/miniroot/install.sh
index f80d16ceebf..e8ee8c88046 100644
--- a/distrib/miniroot/install.sh
+++ b/distrib/miniroot/install.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-# $OpenBSD: install.sh,v 1.30 1998/09/23 06:51:20 deraadt Exp $
+# $OpenBSD: install.sh,v 1.31 1998/09/24 21:52:10 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
@@ -369,9 +369,12 @@ case "$resp" in
fi
resp="none"
- if [ -f /tmp/resolv.conf ]; then
+ if [ -f /etc/resolv.conf ]; then
+ resp=`grep '^nameserver ' /etc/resolv.conf | \
+ sed -e 's/^nameserver //' | sed -e '1q'`
+ elif [ -f /tmp/resolv.conf ]; then
resp=`grep '^nameserver ' /tmp/resolv.conf | \
- sed -e 's/^nameserver //'`
+ sed -e 's/^nameserver //' | sed -e '1q'`
fi
echo -n "Enter IP address of primary nameserver: [$resp] "
getresp "$resp"