summaryrefslogtreecommitdiffstats
path: root/dhcpcd.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2014-02-25 10:24:01 +0000
committerRoy Marples <roy@marples.name>2014-02-25 10:24:01 +0000
commit929895ed29f9a62d4c4f26615b78061acb28d0fc (patch)
treeb1f9372da305e195fd5191929d76a747c130dcb8 /dhcpcd.c
parent658bfd5e0cc0dc56d8bb7caf2e6d2a58821798a9 (diff)
downloaddhcpcd-929895ed29f9a62d4c4f26615b78061acb28d0fc.tar.xz
Respect initial commandline arguments when rebooting via a signal.
Diffstat (limited to 'dhcpcd.c')
-rw-r--r--dhcpcd.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/dhcpcd.c b/dhcpcd.c
index 900f3011..128726c0 100644
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -882,7 +882,10 @@ handle_signal1(void *arg)
ifo->options |= DHCPCD_DAEMONISED;
ctx->options = ifo->options;
free_options(ifo);
- reconf_reboot(ctx, 1, ctx->ifc, ctx->ifv, 0);
+ /* Preserve any options passed on the commandline
+ * when we were started. */
+ reconf_reboot(ctx, 1, ctx->argc, ctx->argv,
+ ctx->argc - ctx->ifc);
return;
case SIGHUP:
syslog(LOG_INFO, "received SIGHUP from PID %d, releasing",
@@ -1090,6 +1093,7 @@ handle_args(struct dhcpcd_ctx *ctx, struct fd_list *fd, int argc, char **argv)
return 0;
}
+ /* XXX: Respect initial commandline options? */
reconf_reboot(ctx, do_reboot, argc, argv, optind);
return 0;
}