summaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1999-09-06 15:06:17 +0000
committerjkh <jkh@FreeBSD.org>1999-09-06 15:06:17 +0000
commit6a139b598244e8aefd10cf234836a9682e1a6039 (patch)
tree5279f0e9e4273b65c599a0301a062260eb7a1b93 /release
parent6c707b6334818afa5e0be1aaef3f263cac4a1d8a (diff)
downloadFreeBSD-src-6a139b598244e8aefd10cf234836a9682e1a6039.zip
FreeBSD-src-6a139b598244e8aefd10cf234836a9682e1a6039.tar.gz
Only do dhclient once; it has its own internal retry which is more than
long enough (and doing it multiple times results in a dialog which waits AGES to complete).
Diffstat (limited to 'release')
-rw-r--r--release/sysinstall/tcpip.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/release/sysinstall/tcpip.c b/release/sysinstall/tcpip.c
index 105ed2c..4e2d8d3 100644
--- a/release/sysinstall/tcpip.c
+++ b/release/sysinstall/tcpip.c
@@ -225,16 +225,18 @@ tcpOpenDialog(Device *devp)
Mkdir("/var/run");
Mkdir("/tmp");
msgNotify("Scanning for DHCP servers...");
- for (k = 1; k < 4; k++) {
- if (0 == vsystem("dhclient -1 %s", devp->name)) {
- dhcpGetInfo(devp);
- use_dhcp = TRUE;
- break;
- }
- msgNotify("Scanning for DHCP servers... Retry: %d", k);
+ if (0 == vsystem("dhclient -1 %s", devp->name)) {
+ dhcpGetInfo(devp);
+ use_dhcp = TRUE;
}
+ else
+ use_dhcp = FALSE;
}
+ /* Special hack so it doesn't show up oddly in the tcpip setup menu */
+ if (!strcmp(gateway, "NO"))
+ gateway[0] = '\0';
+
/* Get old IP address from variable space, if available */
if (!ipaddr[0]) {
if ((cp = variable_get(VAR_IPADDR)) != NULL)
@@ -273,7 +275,7 @@ tcpOpenDialog(Device *devp)
}
if (!gateway[0]) {
tmp = variable_get(VAR_GATEWAY);
- if (tmp)
+ if (tmp && strcmp(tmp, "NO"))
SAFE_STRCPY(gateway, tmp);
}
if (!nameserver[0]) {
OpenPOWER on IntegriCloud