diff options
author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-11-23 15:08:37 +0000 |
---|---|---|
committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2006-11-23 15:08:37 +0000 |
commit | 6e5ed45d045322f3461fa6cb69ea380d1c1b45c0 (patch) | |
tree | db2c8ac1e7fd4d6f2f718cf185badf74a2c627be | |
parent | eb8ff925d7af3665ed846f0d9a7db6193821ba58 (diff) | |
download | busybox-w32-6e5ed45d045322f3461fa6cb69ea380d1c1b45c0.tar.gz busybox-w32-6e5ed45d045322f3461fa6cb69ea380d1c1b45c0.tar.bz2 busybox-w32-6e5ed45d045322f3461fa6cb69ea380d1c1b45c0.zip |
ifupdown:
ifconfig said to set iface up before it processes hw %hwaddress%,
which then of course fails. Thus we run two separate ifconfig
git-svn-id: svn://busybox.net/trunk/busybox@16647 69ca8d6d-28ef-0310-b511-8ec308f3f277
-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 d4e49c4c1..5d140f1da 100644 --- a/networking/ifupdown.c +++ b/networking/ifupdown.c | |||
@@ -417,12 +417,15 @@ static int static_up(struct interface_defn_t *ifd, execfn *exec) | |||
417 | result += execute("[[ ip route add default via %gateway% dev %iface% ]]", ifd, exec); | 417 | result += execute("[[ ip route add default via %gateway% dev %iface% ]]", ifd, exec); |
418 | return ((result == 3) ? 3 : 0); | 418 | return ((result == 3) ? 3 : 0); |
419 | #else | 419 | #else |
420 | result = execute("ifconfig %iface% %address% netmask %netmask% " | 420 | /* ifconfig said to set iface up before it processes hw %hwaddress%, |
421 | "[[broadcast %broadcast%]] [[pointopoint %pointopoint%]] " | 421 | * which then of course fails. Thus we run two separate ifconfig */ |
422 | "[[media %media%]] [[mtu %mtu%]] [[hw %hwaddress%]] up", | 422 | result = execute("ifconfig %iface% [[hw %hwaddress%]] [[media %media%]] [[mtu %mtu%]] up", |
423 | ifd, exec); | 423 | ifd, exec); |
424 | result += execute("[[ route add default gw %gateway% %iface% ]]", ifd, exec); | 424 | result += execute("ifconfig %iface% %address% netmask %netmask% " |
425 | return ((result == 2) ? 2 : 0); | 425 | "[[broadcast %broadcast%]] [[pointopoint %pointopoint%]] ", |
426 | ifd, exec); | ||
427 | result += execute("[[ route add default gw %gateway% %iface% ]]", ifd, exec); | ||
428 | return ((result == 3) ? 3 : 0); | ||
426 | #endif | 429 | #endif |
427 | } | 430 | } |
428 | 431 | ||