if (state->options & DHCPCD_LINK) {
open_link_socket(iface);
if (carrier_status(iface->name) == 0) {
- if (!(state->options & DHCPCD_NOWAIT))
+ if (!(state->options & DHCPCD_BACKGROUND))
logger(LOG_INFO, "waiting for carrier");
state->state = STATE_CARRIER;
tv.tv_sec = options->timeout;
state->signal_fd = signal_fd();
- if (state->options & DHCPCD_NOWAIT)
+ if (state->options & DHCPCD_BACKGROUND)
if (daemonise(state, options) == -1)
goto eexit;
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.Dd Jul 16, 2008
+.Dd Jul 18, 2008
.Dt DHCPCD 8 SMM
.Sh NAME
.Nm dhcpcd
.Nd an RFC 2131 compliant DHCP client
.Sh SYNOPSIS
.Nm
-.Op Fl dknpqADEGKLSTVWX
+.Op Fl bdknpqADEGKLSTVX
.Op Fl c , -script Ar script
.Op Fl f , -config Ar file
.Op Fl h , -hostname Ar hostname
.Nm
with the following options:
.Bl -tag -width indent
+.It Fl b , -background
+Background immediately.
+This is useful for startup scripts which don't disable link messages for
+carrier status.
.It Fl c , -script Ar script
Use this
.Ar script
Change the default clientid sent from the interface hardware address.
If the string is of the format 01:02:03 then it is encoded as hex.
If not set then none is sent.
-.It Fl W , -nowait
-Don't wait for a DHCP lease, background immediately.
-This is useful for startup scripts which don't disable link messages for
-carrier status.
.El
.Ss Restriciting behaviour
.Nm
/* Don't set any optional arguments here so we retain POSIX
* compatibility with getopt */
-#define OPTS "c:df:h:i:kl:m:no:pqr:s:t:u:v:xAC:DEF:GI:KLO:TVWX"
+#define OPTS "bc:df:h:i:kl:m:no:pqr:s:t:u:v:xAC:DEF:GI:KLO:TVX"
static int doversion = 0;
static int dohelp = 0;
static const struct option longopts[] = {
+ {"background", no_argument, NULL, 'b'},
{"script", required_argument, NULL, 'c'},
{"debug", no_argument, NULL, 'd'},
{"config", required_argument, NULL, 'f'},
{"nooption", optional_argument, NULL, 'O'},
{"test", no_argument, NULL, 'T'},
{"variables", no_argument, NULL, 'V'},
- {"nowait", no_argument, NULL, 'W'},
- {"nodaemonise", no_argument, NULL, 'X'},
{"help", no_argument, &dohelp, 1},
{"version", no_argument, &doversion, 1},
#ifdef THERE_IS_NO_FORK
#endif
switch(opt) {
+ case 'b':
+ options->options |= DHCPCD_BACKGROUND;
+ break;
case 'c':
strlcpy(options->script, oarg, sizeof(options->script));
break;
return -1;
}
break;
- case 'W':
- options->options |= DHCPCD_NOWAIT;
- break;
case 'X':
options->options &= ~DHCPCD_DAEMONISE;
break;