From 9c7ac60a2eeaec718f652532191d4895fc87dcda Mon Sep 17 00:00:00 2001 From: bug1 Date: Mon, 11 Nov 2002 07:03:02 +0000 Subject: Make ifupdown use internal run_parts git-svn-id: svn://busybox.net/trunk/busybox@5910 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- networking/ifupdown.c | 15 ++++++++------- 1 file 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 @@ #include #include -#include "busybox.h" -#include "config.h" +#include "libbb.h" +//#include "busybox.h" +//#include "config.h" #define IFUPDOWN_VERSION "0.6.4" @@ -1020,7 +1021,7 @@ static int doit(char *str) static int execute_all(interface_defn *ifd, execfn *exec, const char *opt) { int i; -// char buf[100]; + char *buf; for (i = 0; i < ifd->n_options; i++) { if (strcmp(ifd->option[i].name, opt) == 0) { @@ -1030,10 +1031,10 @@ static int execute_all(interface_defn *ifd, execfn *exec, const char *opt) } } - runparts("/etc/network/if-"opt".d"); -// sprintf(buf, "run-parts /etc/network/if-%s.d", opt); -// (*exec) (buf); - + buf = xmalloc(xstrlen(opt) + 19); + sprintf(buf, "/etc/network/if-%s.d", opt); + run_parts(&buf, 0); + free(buf); return (1); } -- cgit v1.2.3-55-g6feb