From: rpe Date: Sat, 17 Feb 2018 19:05:41 +0000 (+0000) Subject: Since rev 1.543 of dhclient it sends the 'host-name' by default. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=3cd35060a98e2d0570b206ab6ba1d41723493134;p=openbsd Since rev 1.543 of dhclient it sends the 'host-name' by default. - remove the leftover _hn variable from dhcp_request() - remove the "$_name" parameter when using dhcp_request() in v4_config() - change comments of v{4,6}_config() to reflect the purpose of _name OK krw tb --- diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index ad9b7212e00..e534a9ac79e 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sub,v 1.1060 2018/02/14 11:43:05 tb Exp $ +# $OpenBSD: install.sub,v 1.1061 2018/02/17 19:05:41 rpe Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015, Robert Peichaer @@ -872,7 +872,7 @@ ask_password() { # Issue a DHCP request to configure interface $1. dhcp_request() { - local _if=$1 _hn=$2 + local _if=$1 echo "lookup file bind" >/etc/resolv.conf.tail @@ -1005,7 +1005,7 @@ vlan_config() { # Parameters: # # $1 = name of the network device -# $2 = hostname to use for dhcp request +# $2 = hostname to add to hosts file # $3 = /path/to/hostname.if # v4_config() { @@ -1037,7 +1037,7 @@ v4_config() { echo "DHCP not possible - no /sbin/dhclient." $AUTO && exit 1 || continue else - dhcp_request $_if "$_name" + dhcp_request $_if echo "dhcp" >>$_hn return fi @@ -1111,7 +1111,7 @@ v6_defroute() { # Parameters: # # $1 = name of the network device -# $2 = hostname to use for dhcp request +# $2 = hostname to add to hosts file # $3 = /path/to/hostname.if # v6_config() {