]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
script: Fix prior when we have listeners but no script
authorRoy Marples <roy@marples.name>
Mon, 25 Mar 2019 12:20:45 +0000 (12:20 +0000)
committerRoy Marples <roy@marples.name>
Mon, 25 Mar 2019 12:20:45 +0000 (12:20 +0000)
src/script.c

index 800c4c3164e1b6bc6ce35e657111e961c3891dfa..deeda5272e355fa45fadd11e6e470d2119411bb5 100644 (file)
@@ -704,7 +704,7 @@ script_runreason(const struct interface *ifp, const char *reason)
        int status = 0;
        struct fd_list *fd;
 
-       if (ifp->options->script == NULL ||
+       if (ifp->options->script == NULL &&
            TAILQ_FIRST(&ifp->ctx->control_fds) == NULL)
                return 0;
 
@@ -715,9 +715,7 @@ script_runreason(const struct interface *ifp, const char *reason)
                return -1;
        }
 
-       if (ifp->options->script &&
-           (ifp->options->script[0] == '\0' ||
-           strcmp(ifp->options->script, "/dev/null") == 0))
+       if (ifp->options->script == NULL)
                goto send_listeners;
 
        argv[0] = ifp->options->script ? ifp->options->script : UNCONST(SCRIPT);