From: Roy Marples Date: Mon, 30 Jan 2012 16:59:48 +0000 (+0000) Subject: Don't attempt to run the script if it's an NULL, an empty string or /dev/null X-Git-Tag: v5.5.1~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb25289b0f18bf87810164f5e76cfaffa75286d9;p=thirdparty%2Fdhcpcd.git Don't attempt to run the script if it's an NULL, an empty string or /dev/null --- 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);