svn commit: trunk/busybox/networking

vda at busybox.net vda at busybox.net
Thu Nov 23 15:08:37 UTC 2006


Author: vda
Date: 2006-11-23 07:08:37 -0800 (Thu, 23 Nov 2006)
New Revision: 16647

Log:
ifupdown:
ifconfig said to set iface up before it processes hw %hwaddress%,
which then of course fails. Thus we run two separate ifconfig


Modified:
   trunk/busybox/networking/ifupdown.c


Changeset:
Modified: trunk/busybox/networking/ifupdown.c
===================================================================
--- trunk/busybox/networking/ifupdown.c	2006-11-23 15:07:38 UTC (rev 16646)
+++ trunk/busybox/networking/ifupdown.c	2006-11-23 15:08:37 UTC (rev 16647)
@@ -417,12 +417,15 @@
 	result += execute("[[ ip route add default via %gateway% dev %iface% ]]", ifd, exec);
 	return ((result == 3) ? 3 : 0);
 #else
-	result = execute("ifconfig %iface% %address% netmask %netmask% "
-			"[[broadcast %broadcast%]] [[pointopoint %pointopoint%]] "
-			"[[media %media%]] [[mtu %mtu%]] [[hw %hwaddress%]] up",
-			ifd, exec);
-	result += execute("[[ route add default gw %gateway% %iface% ]]", ifd, exec);
-	return ((result == 2) ? 2 : 0);
+	/* ifconfig said to set iface up before it processes hw %hwaddress%,
+	 * which then of course fails. Thus we run two separate ifconfig */
+	result = execute("ifconfig %iface% [[hw %hwaddress%]] [[media %media%]] [[mtu %mtu%]] up",
+				ifd, exec);
+	result += execute("ifconfig %iface% %address% netmask %netmask% "
+				"[[broadcast %broadcast%]] [[pointopoint %pointopoint%]] ",
+				ifd, exec);
+ 	result += execute("[[ route add default gw %gateway% %iface% ]]", ifd, exec);
+	return ((result == 3) ? 3 : 0);
 #endif
 }
 




More information about the busybox-cvs mailing list