diff options
| author | Roy Marples <roy@marples.name> | 2016-07-27 16:47:34 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2016-07-27 16:47:34 +0000 |
| commit | b4a8658466fc01fcb075e765c9d5e568e5665412 (patch) | |
| tree | ed4524f71c0e34e6d95aa460e207635ded2ad283 /if.c | |
| parent | d2a12089d3f8d9a9f685ea30226f4aef304c87cb (diff) | |
| download | dhcpcd-b4a8658466fc01fcb075e765c9d5e568e5665412.tar.xz | |
Add --inactive which makes all interfaces inactive on initial start.
Subsequent dhcpcd commands will start each interface.
Diffstat (limited to 'if.c')
| -rw-r--r-- | if.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -291,20 +291,20 @@ if_discover(struct dhcpcd_ctx *ctx, int argc, char * const *argv) if (ifp) continue; - active = IF_ACTIVE_USER; if (argc > 0) { for (i = 0; i < argc; i++) { if (strcmp(argv[i], spec.devname) == 0) break; } - if (i == argc) - active = IF_INACTIVE; + active = (i == argc) ? IF_INACTIVE : IF_ACTIVE_USER; } else { /* -1 means we're discovering against a specific * interface, but we still need the below rules * to apply. */ if (argc == -1 && strcmp(argv[0], spec.devname) != 0) continue; + active = ctx->options & DHCPCD_INACTIVE ? + IF_INACTIVE: IF_ACTIVE_USER; } for (i = 0; i < ctx->ifdc; i++) |
