aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--networking/ifupdown.c11
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)
1023static int execute_all(struct interface_defn_t *ifd, execfn *exec, const char *opt) 1023static int execute_all(struct interface_defn_t *ifd, execfn *exec, const char *opt)
1024{ 1024{
1025 int i; 1025 int i;
1026 char *buf[2]; 1026 char *buf[100];
1027
1028 for (i = 0; i < ifd->n_options; i++) { 1027 for (i = 0; i < ifd->n_options; i++) {
1029 if (strcmp(ifd->option[i].name, opt) == 0) { 1028 if (strcmp(ifd->option[i].name, opt) == 0) {
1030 if (!(*exec) (ifd->option[i].value)) { 1029 if (!(*exec) (ifd->option[i].value)) {
@@ -1032,12 +1031,10 @@ static int execute_all(struct interface_defn_t *ifd, execfn *exec, const char *o
1032 } 1031 }
1033 } 1032 }
1034 } 1033 }
1034
1035 bb_xasprintf(buf, "run-parts /etc/network/if-%s.d", opt);
1036 (*exec)(buf);
1035 1037
1036 bb_xasprintf(&buf[0], "/etc/network/if-%s.d", opt);
1037 buf[1] = NULL;
1038
1039 run_parts(buf, 2, environ);
1040 free(buf[0]);
1041 return (1); 1038 return (1);
1042} 1039}
1043 1040