diff options
| author | Roy Marples <roy@marples.name> | 2012-01-30 16:59:48 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2012-01-30 16:59:48 +0000 |
| commit | bb25289b0f18bf87810164f5e76cfaffa75286d9 (patch) | |
| tree | 8c23ae3e483638d82ccf4b5b45f2a6478a732860 | |
| parent | e0c4d1587d18660ab5b1bc8b0c8b18f54973589b (diff) | |
| download | dhcpcd-bb25289b0f18bf87810164f5e76cfaffa75286d9.tar.xz | |
Don't attempt to run the script if it's an NULL, an empty string or /dev/null
| -rw-r--r-- | configure.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/configure.c b/configure.c index db5b0ec2..90185375 100644 --- a/configure.c +++ b/configure.c @@ -329,6 +329,11 @@ run_script(const struct interface *iface) const struct fd_list *fd; struct iovec iov[2]; + if (iface->state->options->script == NULL || + iface->state->options->script[0] == '\0' || + strcmp(iface->state->options->script, "/dev/null") == 0) + return 0; + syslog(LOG_DEBUG, "%s: executing `%s', reason %s", iface->name, argv[0], iface->state->reason); |
