diff options
| author | Roy Marples <roy@marples.name> | 2020-11-25 14:05:18 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2020-11-25 14:05:18 +0000 |
| commit | ba04408c085ddf6b626352dc34f95dace33a78d2 (patch) | |
| tree | 3bf773f7c3038e0d6b5e7ff2282c6c7aae6089de /src/dhcpcd.c | |
| parent | 3ca5bffd2de92ee21ea733cb0b2716a0a975942d (diff) | |
| download | dhcpcd-ba04408c085ddf6b626352dc34f95dace33a78d2.tar.xz | |
options: allow --ia_na=1 and --ia_pd=2 on the command line
This only works for non master mode.
Diffstat (limited to 'src/dhcpcd.c')
| -rw-r--r-- | src/dhcpcd.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/dhcpcd.c b/src/dhcpcd.c index 205635e7..71575d1d 100644 --- a/src/dhcpcd.c +++ b/src/dhcpcd.c @@ -1883,6 +1883,7 @@ main(int argc, char **argv, char **envp) logopts |= LOGERR_ERR; i = 0; + while ((opt = getopt_long(argc, argv, ctx.options & DHCPCD_PRINT_PIDFILE ? NOERR_IF_OPTS : IF_OPTS, cf_options, &oi)) != -1) @@ -1957,6 +1958,9 @@ main(int argc, char **argv, char **envp) } } + if (optind != argc - 1) + ctx.options |= DHCPCD_MASTER; + logsetopts(logopts); logopen(ctx.logfile); @@ -1973,6 +1977,7 @@ main(int argc, char **argv, char **envp) goto printpidfile; goto exit_failure; } + opt = add_options(&ctx, NULL, ifo, argc, argv); if (opt != 1) { if (ctx.options & DHCPCD_PRINT_PIDFILE) @@ -2013,6 +2018,7 @@ main(int argc, char **argv, char **envp) goto exit_success; } ctx.options |= ifo->options; + if (i == 1 || i == 3) { if (i == 1) ctx.options |= DHCPCD_TEST; |
