Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 9 Sep 2017 00:33:20 +0000 (UTC)
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r323336 - stable/11/usr.sbin/bsdinstall/scripts
Message-ID:  <201709090033.v890XKCr016996@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: emaste
Date: Sat Sep  9 00:33:19 2017
New Revision: 323336
URL: https://svnweb.freebsd.org/changeset/base/323336

Log:
  MFC r322374: bsdinstall: record DHCP config after obtaining lease
  
  Previously we added an ifconfig_$INTERFACE line to rc.conf for each
  unsuccessful DCHP attempt.
  
  PR:		219515
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/11/usr.sbin/bsdinstall/scripts/netconfig_ipv4
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/usr.sbin/bsdinstall/scripts/netconfig_ipv4
==============================================================================
--- stable/11/usr.sbin/bsdinstall/scripts/netconfig_ipv4	Fri Sep  8 22:04:28 2017	(r323335)
+++ stable/11/usr.sbin/bsdinstall/scripts/netconfig_ipv4	Sat Sep  9 00:33:19 2017	(r323336)
@@ -48,8 +48,6 @@ esac
 
 dialog --backtitle 'FreeBSD Installer' --title 'Network Configuration' --yesno 'Would you like to use DHCP to configure this interface?' 0 0
 if [ $? -eq $DIALOG_OK ]; then
-	echo ifconfig_$INTERFACE=\"${IFCONFIG_PREFIX}DHCP\" >> $BSDINSTALL_TMPETC/._rc.conf.net
-
 	if [ ! -z $BSDINSTALL_CONFIGCURRENT ]; then
 		dialog --backtitle 'FreeBSD Installer' --infobox "Acquiring DHCP lease..." 0 0
 		err=$( dhclient $INTERFACE 2>&1 )
@@ -59,6 +57,7 @@ if [ $? -eq $DIALOG_OK ]; then
 			exec $0 ${INTERFACE} "${IFCONFIG_PREFIX}"
 		fi
 	fi
+	echo ifconfig_$INTERFACE=\"${IFCONFIG_PREFIX}DHCP\" >> $BSDINSTALL_TMPETC/._rc.conf.net
 	exit 0
 fi
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709090033.v890XKCr016996>