aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2002-11-11 07:03:02 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2002-11-11 07:03:02 +0000
commit9af8a72f10c97e3b06862203bc4b0d4e6d10e7f5 (patch)
treedc893b8bc87626b6dafd60b8682b1c9faecc89c6
parent545106f8db3e9e40d454a8713e713b0741739b23 (diff)
downloadbusybox-w32-9af8a72f10c97e3b06862203bc4b0d4e6d10e7f5.tar.gz
busybox-w32-9af8a72f10c97e3b06862203bc4b0d4e6d10e7f5.tar.bz2
busybox-w32-9af8a72f10c97e3b06862203bc4b0d4e6d10e7f5.zip
Make ifupdown use internal run_parts
-rw-r--r--networking/ifupdown.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/networking/ifupdown.c b/networking/ifupdown.c
index 8df2e7f5d..b2dbb0d22 100644
--- a/networking/ifupdown.c
+++ b/networking/ifupdown.c
@@ -35,8 +35,9 @@
35#include <string.h> 35#include <string.h>
36#include <unistd.h> 36#include <unistd.h>
37 37
38#include "busybox.h" 38#include "libbb.h"
39#include "config.h" 39//#include "busybox.h"
40//#include "config.h"
40 41
41#define IFUPDOWN_VERSION "0.6.4" 42#define IFUPDOWN_VERSION "0.6.4"
42 43
@@ -1020,7 +1021,7 @@ static int doit(char *str)
1020static int execute_all(interface_defn *ifd, execfn *exec, const char *opt) 1021static int execute_all(interface_defn *ifd, execfn *exec, const char *opt)
1021{ 1022{
1022 int i; 1023 int i;
1023// char buf[100]; 1024 char *buf;
1024 1025
1025 for (i = 0; i < ifd->n_options; i++) { 1026 for (i = 0; i < ifd->n_options; i++) {
1026 if (strcmp(ifd->option[i].name, opt) == 0) { 1027 if (strcmp(ifd->option[i].name, opt) == 0) {
@@ -1030,10 +1031,10 @@ static int execute_all(interface_defn *ifd, execfn *exec, const char *opt)
1030 } 1031 }
1031 } 1032 }
1032 1033
1033 runparts("/etc/network/if-"opt".d"); 1034 buf = xmalloc(xstrlen(opt) + 19);
1034// sprintf(buf, "run-parts /etc/network/if-%s.d", opt); 1035 sprintf(buf, "/etc/network/if-%s.d", opt);
1035// (*exec) (buf); 1036 run_parts(&buf, 0);
1036 1037 free(buf);
1037 return (1); 1038 return (1);
1038} 1039}
1039 1040