]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
PREINIT, UNKNOWN and CARRIER are not up or down states.
authorRoy Marples <roy@marples.name>
Tue, 21 Oct 2014 18:16:28 +0000 (18:16 +0000)
committerRoy Marples <roy@marples.name>
Tue, 21 Oct 2014 18:16:28 +0000 (18:16 +0000)
script.c

index 870cdf26b866439fd5620bd7d1a2a8f55ca70b59..21c994c4889d57231f3992fbc60a202d02970f70 100644 (file)
--- a/script.c
+++ b/script.c
@@ -335,7 +335,11 @@ make_env(const struct interface *ifp, const char *reason, char ***argv)
                }
        }
        *--p = '\0';
-       if (strcmp(reason, "TEST") == 0) {
+       if (strcmp(reason, "TEST") == 0 ||
+           strcmp(reason, "PREINIT") == 0 ||
+           strcmp(reason, "CARRIER") == 0 ||
+           strcmp(reason, "UNKNOWN") == 0)
+       {
                env[9] = strdup("if_up=false");
                env[10] = strdup("if_down=false");
        } else if (1 == 2 /* appease ifdefs */