]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
wait should work in dhcpcd.conf
authorRoy Marples <roy@marples.name>
Sat, 10 Oct 2009 16:25:06 +0000 (16:25 +0000)
committerRoy Marples <roy@marples.name>
Sat, 10 Oct 2009 16:25:06 +0000 (16:25 +0000)
dhcpcd.c
if-options.c

index b5f51351009abc2e1a481fbb6a33dccb2fce967b..437bfd232516948d628a2c24c7550e277c67b360 100644 (file)
--- 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;
index 15669d7e0d91be9d528b9d380bf9c604c5a52441..f555714519fff47293dfde668ac98fa9931c9105 100644 (file)
@@ -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) {