[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [PATCH] save 2 bytes in ifupdown
From:       Natanael Copa <natanael.copa () gmail ! com>
Date:       2008-10-31 7:41:12
Message-ID: 1225438872.8417.61.camel () nc
[Download RAW message or body]

Trivial patch that makes ifupdown call "ip" as 'ip link set addr ...'
rather than 'ip link set address'. The short version, addr, works with
both busybox ip and its bigger brother.

-nc

["busybox-ifupdown-addr.patch" (busybox-ifupdown-addr.patch)]

Index: networking/ifupdown.c
===================================================================
--- networking/ifupdown.c	(revision 23876)
+++ networking/ifupdown.c	(working copy)
@@ -349,7 +349,7 @@
 	int result;
 #if ENABLE_FEATURE_IFUPDOWN_IP
 	result = execute("ip addr add %address%/%netmask% dev %iface%[[ label %label%]]", ifd, exec);
-	result += execute("ip link set[[ mtu %mtu%]][[ address %hwaddress%]] %iface% up", ifd, exec);
+	result += execute("ip link set[[ mtu %mtu%]][[ addr %hwaddress%]] %iface% up", ifd, exec);
 	/* Was: "[[ ip ....%gateway% ]]". Removed extra spaces w/o checking */
 	result += execute("[[ip route add ::/0 via %gateway%]]", ifd, exec);
 #else


_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic