[BusyBox] run-parts help text patch

Eric Spakman E.Spakman at inter.nl.net
Thu Aug 7 17:29:34 UTC 2003


Erik, Nick,

> > I also want to report a problem I have with "run-parts" in bb 
> > ifupdown:
> > When I want to configure a bridge interface with the external brctl 
> > utility (bridge.o kernel module loaded), with the following lines in 
> > /etc/network/interfaces:
> > 
> > iface br0 inet static
> >         address 192.168.1.254
> >         netmask 255.255.255.0
> >         bridge_ports all
> 
> What is this strange "bridge_ports all" option you have added?
> Whatever it is, it is not supported in Debian and is not
> supported in busybox either.  

I wrote a very small patch (quick and dirty) for ifupdown (attached), 
with the external brctl program and the apropiate scripts in the 
/etc/network/if-*.d/ directories, bridging with the above config just 
works with busybox ifupdown! 
It is basicly just a copy of the original ifupdown code part and is 
not meant for inclusion in CVS, because it replaces the more 
sophisticated  code of  calling run_parts internally.

Regards,
Eric Spakman 

-------------- next part --------------
--- ./busybox.old/networking/ifupdown.c	Wed Aug  6 11:23:44 2003
+++ ./busybox/networking/ifupdown.c	Thu Aug  7 08:28:05 2003
@@ -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)) {
@@ -1033,11 +1032,9 @@
 		}
 	}
 
-	bb_xasprintf(&buf[0], "/etc/network/if-%s.d", opt);
-	buf[1] = NULL;
+	sprintf(buf, "run-parts /etc/network/if-%s.d", opt);
+	(*exec)(buf);
 
-	run_parts(buf, 2, environ);
-	free(buf[0]);
 	return (1);
 }
 


More information about the busybox mailing list