diff options
author | jkh <jkh@FreeBSD.org> | 1999-07-19 11:00:56 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1999-07-19 11:00:56 +0000 |
commit | de1add3d31f437c254ccedea628c940dfa723e51 (patch) | |
tree | 6ee35b35b054cef6804b0060963ccf04f0cc01e3 /release | |
parent | 3f0530abee81a62f516046286408f1c1bcf15a33 (diff) | |
download | FreeBSD-src-de1add3d31f437c254ccedea628c940dfa723e51.zip FreeBSD-src-de1add3d31f437c254ccedea628c940dfa723e51.tar.gz |
Wait for dhclient in a far saner fashion.
Submitted by: obrien
Diffstat (limited to 'release')
-rw-r--r-- | release/sysinstall/tcpip.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/release/sysinstall/tcpip.c b/release/sysinstall/tcpip.c index 8ff9b8c..ffa2f05 100644 --- a/release/sysinstall/tcpip.c +++ b/release/sysinstall/tcpip.c @@ -1,5 +1,5 @@ /* - * $Id: tcpip.c,v 1.83 1999/07/19 10:06:18 jkh Exp $ + * $Id: tcpip.c,v 1.84 1999/07/19 10:18:52 jkh Exp $ * * Copyright (c) 1995 * Gary J Palmer. All rights reserved. @@ -221,13 +221,18 @@ tcpOpenDialog(Device *devp) /* First try a DHCP scan if such behavior is desired */ if (!variable_cmp(VAR_TRY_DHCP, "YES") || !msgYesNo("Do you want to try DHCP configuration of the interface?")) { + int k; + Mkdir("/var/db"); Mkdir("/var/run"); Mkdir("/tmp"); msgNotify("Scanning for DHCP servers..."); - if (!vsystem("dhclient %s", devp->name)) { - dhcpGetInfo(devp); - use_dhcp = TRUE; + for (k = 3; k; --k) { + if (0 == vsystem("dhclient -1 %s", devp->name)) { + dhcpGetInfo(devp); + use_dhcp = TRUE; + break; + } } } |