diff options
author | Eric Andersen <andersen@codepoet.org> | 2003-09-12 05:59:53 +0000 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2003-09-12 05:59:53 +0000 |
commit | 51ed242ad6c94f34d01461afc7141579f855017d (patch) | |
tree | 5c449890da57f30d0cd76e711bc32368bee82577 | |
parent | e15138a87024c627d1a0e64b5d25dda1bc634c6a (diff) | |
download | busybox-51ed242ad6c94f34d01461afc7141579f855017d.tar.gz |
Invoke run-parts on /etc/network/if-*.d per the behavior of
the upstream ifupdown code...
-rw-r--r-- | networking/ifupdown.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/networking/ifupdown.c b/networking/ifupdown.c index 1a23bac37..3662421a6 100644 --- a/networking/ifupdown.c +++ b/networking/ifupdown.c @@ -1023,8 +1023,7 @@ static int doit(char *str) static int execute_all(struct interface_defn_t *ifd, execfn *exec, const char *opt) { int i; - char *buf[2]; - + char *buf[100]; for (i = 0; i < ifd->n_options; i++) { if (strcmp(ifd->option[i].name, opt) == 0) { if (!(*exec) (ifd->option[i].value)) { @@ -1032,12 +1031,10 @@ static int execute_all(struct interface_defn_t *ifd, execfn *exec, const char *o } } } + + bb_xasprintf(buf, "run-parts /etc/network/if-%s.d", opt); + (*exec)(buf); - bb_xasprintf(&buf[0], "/etc/network/if-%s.d", opt); - buf[1] = NULL; - - run_parts(buf, 2, environ); - free(buf[0]); return (1); } |