From: Roy Marples Date: Tue, 21 Oct 2014 18:16:28 +0000 (+0000) Subject: PREINIT, UNKNOWN and CARRIER are not up or down states. X-Git-Tag: v6.6.0~20 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=345b0bbdd57607f23189c9921e01b88afbc04085;p=thirdparty%2Fdhcpcd.git PREINIT, UNKNOWN and CARRIER are not up or down states. --- diff --git a/script.c b/script.c index 870cdf26..21c994c4 100644 --- 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 */