diff options
author | Denis Vlasenko | 2006-11-23 15:08:37 +0000 |
---|---|---|
committer | Denis Vlasenko | 2006-11-23 15:08:37 +0000 |
commit | a741b778fec47cec95029590e2816c639b85ec5c (patch) | |
tree | db2c8ac1e7fd4d6f2f718cf185badf74a2c627be | |
parent | 93ad1c2385b9f628c6ccdbfa6fade62f1ae754fc (diff) | |
download | busybox-a741b778fec47cec95029590e2816c639b85ec5c.zip busybox-a741b778fec47cec95029590e2816c639b85ec5c.tar.gz |
ifupdown:
ifconfig said to set iface up before it processes hw %hwaddress%,
which then of course fails. Thus we run two separate ifconfig
-rw-r--r-- | networking/ifupdown.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/networking/ifupdown.c b/networking/ifupdown.c index d4e49c4..5d140f1 100644 --- a/networking/ifupdown.c +++ b/networking/ifupdown.c @@ -417,12 +417,15 @@ static int static_up(struct interface_defn_t *ifd, execfn *exec) 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 } |