]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Always daemonise on timeout if running in master mode.
authorRoy Marples <roy@marples.name>
Sat, 26 Jun 2010 09:17:54 +0000 (09:17 +0000)
committerRoy Marples <roy@marples.name>
Sat, 26 Jun 2010 09:17:54 +0000 (09:17 +0000)
dhcpcd.c

index cb33929e7fba36c79a66a94d9cfb817638102be3..11db53afbaa5395de428ba28fa32b069e2ee22d0 100644 (file)
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -198,8 +198,13 @@ handle_exit_timeout(_unused void *arg)
        struct interface *ifp;
 
        syslog(LOG_ERR, "timed out");
-       if (!(options & DHCPCD_TIMEOUT_IPV4LL))
-               exit(EXIT_FAILURE);
+       if (!(options & DHCPCD_TIMEOUT_IPV4LL)) {
+               if (options & DHCPCD_MASTER) {
+                       daemonise();
+                       return;
+               } else
+                       exit(EXIT_FAILURE);
+       }
        options &= ~DHCPCD_TIMEOUT_IPV4LL;
        timeout = (PROBE_NUM * PROBE_MAX) + PROBE_WAIT + 1;
        /* Add an extra second per interface */