]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
We need to enable waitip when running on a single interface to retain
authorRoy Marples <roy@marples.name>
Sun, 25 Oct 2009 10:56:54 +0000 (10:56 +0000)
committerRoy Marples <roy@marples.name>
Sun, 25 Oct 2009 10:56:54 +0000 (10:56 +0000)
compat with older dhcpcd versions.

dhcpcd.c

index 7dec827ac5cabf6f72f8f15391b403af0ebe1e8c..6988be17af494e3f723c7567246089547db36438 100644 (file)
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -1770,6 +1770,11 @@ main(int argc, char **argv)
        ifc = argc - optind;
        ifv = argv + optind;
 
+       /* When running dhcpcd against a single interface, we need to retain
+        * the old behaviour of waiting for an IP address */
+       if (ifc == 1)
+               options |= DHCPCD_WAITIP;
+
        ifaces = discover_interfaces(ifc, ifv);
        for (i = 0; i < ifc; i++) {
                for (iface = ifaces; iface; iface = iface->next)