[BusyBox-cvs] busybox/networking ifupdown.c,1.32,1.33

Erik Andersen andersen at busybox.net
Fri Sep 12 05:59:56 UTC 2003


Update of /var/cvs/busybox/networking
In directory winder:/tmp/cvs-serv19686/networking

Modified Files:
	ifupdown.c 
Log Message:
Invoke run-parts on /etc/network/if-*.d per the behavior of 
the upstream ifupdown code...


Index: ifupdown.c
===================================================================
RCS file: /var/cvs/busybox/networking/ifupdown.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -d -r1.32 -r1.33
--- ifupdown.c	2 Sep 2003 02:36:15 -0000	1.32
+++ ifupdown.c	12 Sep 2003 05:59:53 -0000	1.33
@@ -1023,8 +1023,7 @@
 static int execute_all(struct interface_defn_t *ifd, execfn *exec, const char *opt)
 {
 	int i;
-	char *buf[2];
-
+	char *buf[100];
 	for (i = 0; i < ifd->n_options; i++) {
 		if (strcmp(ifd->option[i].name, opt) == 0) {
 			if (!(*exec) (ifd->option[i].value)) {
@@ -1032,12 +1031,10 @@
 			}
 		}
 	}
+	
+	bb_xasprintf(buf, "run-parts /etc/network/if-%s.d", opt);
+	(*exec)(buf);
 
-	bb_xasprintf(&buf[0], "/etc/network/if-%s.d", opt);
-	buf[1] = NULL;
-
-	run_parts(buf, 2, environ);
-	free(buf[0]);
 	return (1);
 }
 




More information about the busybox-cvs mailing list