Hi,
When installing with a dhcp server that does not provide domain-name
and name-server information, the user is not asked for this
configuration.
Using DNS domainname my.domain
Using DNS nameservers at none
The -n check in donetconfig() is always true as the variables have
been assigned with a default value just before. I think the default
value is only relevant in the else case. Then the question looks
like this.
DNS domain name? (e.g. 'bar.com') [my.domain]
DNS nameservers? (IP address list or 'none') [none]
ok?
bluhm
Index: distrib/miniroot/install.sub
===================================================================
RCS file: /data/mirror/openbsd/cvs/src/distrib/miniroot/install.sub,v
retrieving revision 1.936
diff -u -p -r1.936 install.sub
--- distrib/miniroot/install.sub 19 Dec 2016 19:59:38 -0000 1.936
+++ distrib/miniroot/install.sub 29 Dec 2016 15:11:49 -0000
@@ -1733,10 +1733,11 @@ donetconfig() {
# Get & apply fqdn to hostname. Don't ask if there's only one configured
# interface and if it's managed by dhclient and if the domain name is
# configured via dhclient too.
- resp="${_dn:=$(get_fqdn)}"
if ifconfig dhcp >/dev/null 2>&1 && [[ $NIFS == 1 && -n $_dn ]]; then
+ resp="${_dn}"
echo "Using DNS domainname $resp"
else
+ resp="${_dn:=$(get_fqdn)}"
ask "DNS domain name? (e.g. 'bar.com')" "$resp"
fi
hostname "$(hostname -s).$resp"
@@ -1744,10 +1745,11 @@ donetconfig() {
# Get & add nameservers to /tmp/i/resolv.conf. Don't ask if there's only
# one configured interface and if it's managed by dhclient and if the
# nameserver is configured via dhclient too.
- resp="${_ns:=none}"
if ifconfig dhcp >/dev/null 2>&1 && [[ $NIFS == 1 && -n $_ns ]]; then
+ resp="${_ns}"
echo "Using DNS nameservers at $resp"
else
+ resp="${_ns:=none}"
ask "DNS nameservers? (IP address list or 'none')" "$resp"
fi