aboutsummaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-09-12 05:59:53 +0000
committerandersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277>2003-09-12 05:59:53 +0000
commit0f21f86ce39fa4cb160fdeb3790e300f959d4b18 (patch)
tree5c449890da57f30d0cd76e711bc32368bee82577 /networking
parent0ff0815bfddf93555f5a06365399d784a0ce2375 (diff)
downloadbusybox-w32-0f21f86ce39fa4cb160fdeb3790e300f959d4b18.tar.gz
busybox-w32-0f21f86ce39fa4cb160fdeb3790e300f959d4b18.tar.bz2
busybox-w32-0f21f86ce39fa4cb160fdeb3790e300f959d4b18.zip
Invoke run-parts on /etc/network/if-*.d per the behavior of
the upstream ifupdown code... git-svn-id: svn://busybox.net/trunk/busybox@7483 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'networking')
-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