From: Roy Marples Date: Sat, 10 Oct 2009 16:25:06 +0000 (+0000) Subject: wait should work in dhcpcd.conf X-Git-Tag: v5.1.2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ecfd63cc92990cfb84cd5949efcb133237e2b9ff;p=thirdparty%2Fdhcpcd.git wait should work in dhcpcd.conf --- diff --git a/dhcpcd.c b/dhcpcd.c index b5f51351..437bfd23 100644 --- a/dhcpcd.c +++ b/dhcpcd.c @@ -1553,7 +1553,7 @@ main(int argc, char **argv) { struct if_options *ifo; struct interface *iface; - int opt, oi = 0, signal_fd, sig = 0, i, control_fd, wflag = 0; + int opt, oi = 0, signal_fd, sig = 0, i, control_fd; size_t len; pid_t pid; struct timespec ts; @@ -1589,9 +1589,6 @@ main(int argc, char **argv) case 'n': sig = SIGALRM; break; - case 'w': - wflag = 1; - break; case 'x': sig = SIGTERM; break; @@ -1621,8 +1618,6 @@ main(int argc, char **argv) options |= DHCPCD_TEST | DHCPCD_PERSISTENT; options &= ~DHCPCD_DAEMONISE; } - if (wflag != 0) - options |= DHCPCD_WAITIP; #ifdef THERE_IS_NO_FORK options &= ~DHCPCD_DAEMONISE; diff --git a/if-options.c b/if-options.c index 15669d7e..f5557145 100644 --- a/if-options.c +++ b/if-options.c @@ -330,7 +330,6 @@ parse_option(struct if_options *ifo, int opt, const char *arg) case 'f': /* FALLTHROUGH */ case 'g': /* FALLTHROUGH */ case 'n': /* FALLTHROUGH */ - case 'w': /* FALLTHROUGH */ case 'x': /* FALLTHROUGH */ case 'T': /* We need to handle non interface options */ break; @@ -509,6 +508,9 @@ parse_option(struct if_options *ifo, int opt, const char *arg) ifo->vendor[0] += s + 2; } break; + case 'w': + ifo->options |= DHCPCD_WAITIP; + break; case 'y': ifo->reboot = atoint(arg); if (ifo->reboot < 0) {