Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 Jul 2020 13:20:45 -0400
From:      Allan Jude <allanjude@freebsd.org>
To:        Mateusz Guzik <mjguzik@gmail.com>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Mark Johnston <markj@freebsd.org>
Subject:   Re: svn commit: r363097 - head/usr.sbin/bsdinstall/scripts
Message-ID:  <ba658962-c75d-5726-ab73-0309ec2e20c8@freebsd.org>
In-Reply-To: <CAGudoHFgFWxThFqW-aMUmp9WuFDCVZT9mQSBztDCLyDRw_1=HQ@mail.gmail.com>
References:  <202007111532.06BFWr7Y041417@repo.freebsd.org> <CAGudoHFgFWxThFqW-aMUmp9WuFDCVZT9mQSBztDCLyDRw_1=HQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2020-07-11 11:44, Mateusz Guzik wrote:
> On 7/11/20, Allan Jude <allanjude@freebsd.org> wrote:
>> Author: allanjude
>> Date: Sat Jul 11 15:32:53 2020
>> New Revision: 363097
>> URL: https://svnweb.freebsd.org/changeset/base/363097
>>
>> Log:
>>   bsdinstall: kill dhclient before starting a new instance
>>
>>   PR:		205821
>>   Submitted by:	William Orr <will@worrbase.com>
>>   MFC after:	2 weeks
>>   Sponsored by:	Klara Inc.
>>   Event:		July 2020 Bugathon
>>   Differential Revision:	https://reviews.freebsd.org/D14572
>>
>> Modified:
>>   head/usr.sbin/bsdinstall/scripts/netconfig_ipv4
>>
>> Modified: head/usr.sbin/bsdinstall/scripts/netconfig_ipv4
>> ==============================================================================
>> --- head/usr.sbin/bsdinstall/scripts/netconfig_ipv4	Sat Jul 11 14:55:11
>> 2020	(r363096)
>> +++ head/usr.sbin/bsdinstall/scripts/netconfig_ipv4	Sat Jul 11 15:32:53
>> 2020	(r363097)
>> @@ -51,7 +51,7 @@ if [ $? -eq $DIALOG_OK ]; then
>>  	if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then
>>  		ifconfig $INTERFACE up
>>  		dialog --backtitle 'FreeBSD Installer' --infobox "Acquiring DHCP
>> lease..." 0 0
>> -		err=$( dhclient $INTERFACE 2>&1 )
>> +		err=$( pkill dhclient; dhclient $INTERFACE 2>&1 )
>>  		if [ $? -ne 0 ]; then
>>  			f_dprintf "%s" "$err"
>>  			dialog --backtitle 'FreeBSD Installer' --msgbox "DHCP lease acquisition
>> failed." 0 0
> 
> There can be more than one dhclient running, but this will kill everything.
> 

Good point.

Thanks to markj for the suggested fix, committed as r363103


-- 
Allan Jude



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ba658962-c75d-5726-ab73-0309ec2e20c8>