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
This commit is contained in:
Allan Jude 2020-07-11 15:32:53 +00:00
parent 4b9ac8a0a6
commit 9a55656956
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=363097

View File

@ -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