]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
When not daemonising, don't exit on timeout.
authorRoy Marples <roy@marples.name>
Mon, 24 Nov 2014 11:03:28 +0000 (11:03 +0000)
committerRoy Marples <roy@marples.name>
Mon, 24 Nov 2014 11:03:28 +0000 (11:03 +0000)
dhcpcd.c

index 42a5e49ab2bd1b84c7515c27e3faca44943f21d9..5293f9713cbef753656b9581414d2cd3f2a36913 100644 (file)
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -1722,7 +1722,7 @@ main(int argc, char **argv)
                        syslog(LOG_WARNING, "no interfaces have a carrier");
                        if (dhcpcd_daemonise(&ctx))
                                goto exit_success;
-               } else if (t > 0) {
+               } else if (t > 0 && ctx.options & DHCPCD_DAEMONISE) {
                        eloop_timeout_add_sec(ctx.eloop, t,
                            handle_exit_timeout, &ctx);
                }