diff options
| author | Roy Marples <roy@marples.name> | 2014-03-11 10:41:27 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2014-03-11 10:41:27 +0000 |
| commit | f970fb668ee571dc04b66d5ad77696a9a750dd77 (patch) | |
| tree | 9898ebfc17a02a61f66328c1349a955bb3d2c361 /dhcpcd.c | |
| parent | 1ef693d0cab55c50abfa012520282f36816ac055 (diff) | |
| download | dhcpcd-f970fb668ee571dc04b66d5ad77696a9a750dd77.tar.xz | |
Ensure that -M -x ifname does the right thing.
Diffstat (limited to 'dhcpcd.c')
| -rw-r--r-- | dhcpcd.c | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -1196,6 +1196,9 @@ main(int argc, char **argv) ctx.argv = argv; ctx.argc = argc; + ctx.ifc = argc - optind; + ctx.ifv = argv + optind; + ifo = read_config(&ctx, NULL, NULL, NULL); opt = add_options(&ctx, NULL, ifo, argc, argv); if (opt != 1) { @@ -1278,7 +1281,9 @@ main(int argc, char **argv) } #ifdef USE_SIGNALS - if (!(ctx.options & (DHCPCD_MASTER | DHCPCD_TEST))) { + if (!(ctx.options & DHCPCD_TEST) && + (sig == 0 || ctx.ifc != 0)) + { #endif if (ctx.options & DHCPCD_MASTER) i = -1; @@ -1412,9 +1417,6 @@ main(int argc, char **argv) syslog(LOG_WARNING, "IPv4 subnet routes cannot be deleted"); #endif - ctx.ifc = argc - optind; - ctx.ifv = argv + optind; - /* When running dhcpcd against a single interface, we need to retain * the old behaviour of waiting for an IP address */ if (ctx.ifc == 1 && !(ctx.options & DHCPCD_BACKGROUND)) |
