diff options
author | Jordan K. Hubbard <jkh@FreeBSD.org> | 1999-09-06 15:06:17 +0000 |
---|---|---|
committer | Jordan K. Hubbard <jkh@FreeBSD.org> | 1999-09-06 15:06:17 +0000 |
commit | 7bd659ebaf13e02b443158c979d35615db32380a (patch) | |
tree | 359d03d91b81eab3ac901b7eda53bc719093a574 /release/sysinstall/tcpip.c | |
parent | e5174d14c5428ad9b30bdb7461bc9248fcb82c02 (diff) |
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).
Notes
Notes:
svn path=/head/; revision=51019
Diffstat (limited to 'release/sysinstall/tcpip.c')
-rw-r--r-- | release/sysinstall/tcpip.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/release/sysinstall/tcpip.c b/release/sysinstall/tcpip.c index 105ed2c15875..4e2d8d388089 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]) { |