]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Exit correctly if no interfaces have a carrier.
authorRoy Marples <roy@marples.name>
Fri, 7 Feb 2014 09:33:32 +0000 (09:33 +0000)
committerRoy Marples <roy@marples.name>
Fri, 7 Feb 2014 09:33:32 +0000 (09:33 +0000)
dhcpcd.c

index cf2e47672a67aa8fe4e60b3d73d44abbd776e786..8502a7225e3a6adfac49e2085c477a5ca4b4256f 100644 (file)
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -1410,7 +1410,8 @@ main(int argc, char **argv)
                    !(options & DHCPCD_WAITIP))
                {
                        syslog(LOG_WARNING, "no interfaces have a carrier");
-                       daemonise();
+                       if (daemonise())
+                               goto exit_success;
                } else if (i > 0) {
                        if (options & DHCPCD_IPV4LL)
                                options |= DHCPCD_TIMEOUT_IPV4LL;