summaryrefslogtreecommitdiff
path: root/networking/ifupdown.c
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2003-09-12 05:59:53 +0000
committerEric Andersen <andersen@codepoet.org>2003-09-12 05:59:53 +0000
commit51ed242ad6c94f34d01461afc7141579f855017d (patch)
tree5c449890da57f30d0cd76e711bc32368bee82577 /networking/ifupdown.c
parente15138a87024c627d1a0e64b5d25dda1bc634c6a (diff)
downloadbusybox-w32-51ed242ad6c94f34d01461afc7141579f855017d.tar.gz
busybox-w32-51ed242ad6c94f34d01461afc7141579f855017d.tar.bz2
busybox-w32-51ed242ad6c94f34d01461afc7141579f855017d.zip
Invoke run-parts on /etc/network/if-*.d per the behavior of
the upstream ifupdown code...
Diffstat (limited to 'networking/ifupdown.c')
-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