summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2017-09-09 01:23:30 +0000
committeremaste <emaste@FreeBSD.org>2017-09-09 01:23:30 +0000
commiteb2be59fb2b9ba46c4cef009846663838bce140c (patch)
tree8669f694e86bf6232ba34cad9cdb15285e47b355
parent9cbb330f2197dd7d1108f4ce49def97e3b3b22e0 (diff)
downloadFreeBSD-src-eb2be59fb2b9ba46c4cef009846663838bce140c.zip
FreeBSD-src-eb2be59fb2b9ba46c4cef009846663838bce140c.tar.gz
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 Approved by: re (marius) Sponsored by: The FreeBSD Foundation
-rwxr-xr-xusr.sbin/bsdinstall/scripts/netconfig_ipv43
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.sbin/bsdinstall/scripts/netconfig_ipv4 b/usr.sbin/bsdinstall/scripts/netconfig_ipv4
index 88a0fa2..75815fb 100755
--- a/usr.sbin/bsdinstall/scripts/netconfig_ipv4
+++ b/usr.sbin/bsdinstall/scripts/netconfig_ipv4
@@ -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
OpenPOWER on IntegriCloud