diff options
| author | Roy Marples <roy@marples.name> | 2019-03-25 12:20:45 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2019-03-25 12:20:45 +0000 |
| commit | 97bb60296dc42a29a054ebf9347ac31a7d787393 (patch) | |
| tree | 9aa377456b23b8ddbd4c1d2ae48cb451f7591371 | |
| parent | f17480d3e1e914d03fea0c054a028fe979742950 (diff) | |
| download | dhcpcd-97bb60296dc42a29a054ebf9347ac31a7d787393.tar.xz | |
script: Fix prior when we have listeners but no script
| -rw-r--r-- | src/script.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/script.c b/src/script.c index 800c4c31..deeda527 100644 --- a/src/script.c +++ b/src/script.c @@ -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); |
