aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-04-30 09:18:20 +0000
committerRoy Marples <roy@marples.name>2008-04-30 09:18:20 +0000
commitcedd81801a46b6c0750f97bfc89e08626f4442c1 (patch)
tree7274833fbb31214410b7e63ee7d4e33b052ed8c7
parente273b4e08ee0ebc1a001d60e2a5b65a9553a8a8a (diff)
We should use correct iproute2 commands and fix busybox as it's iproute2 implementation is a little broken.
-rw-r--r--net/iproute2.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/net/iproute2.sh b/net/iproute2.sh
index 168771f0..5105d967 100644
--- a/net/iproute2.sh
+++ b/net/iproute2.sh
@@ -10,12 +10,12 @@ iproute2_depend()
_up()
{
- ip link set up dev "${IFACE}"
+ ip link set "${IFACE}" up
}
_down()
{
- ip link set down dev "${IFACE}"
+ ip link set "${IFACE}" down
}
_exists()
@@ -78,7 +78,7 @@ _get_mac_address()
_set_mac_address()
{
- ip link set address "$1" dev "${IFACE}"
+ ip link set "${IFACE}" address "$1"
}
_get_inet_addresses()
@@ -126,7 +126,7 @@ _add_address()
;;
esac
- ip addr add dev "${IFACE}" "$@"
+ ip addr add "$@" dev "${IFACE}"
}
_add_route()
@@ -184,12 +184,12 @@ iproute2_pre_start()
# MTU support
local mtu=
eval mtu=\$mtu_${IFVAR}
- [ -n "${mtu}" ] && ip link set mtu "${mtu}" dev "${IFACE}"
+ [ -n "${mtu}" ] && ip link set "${IFACE}" mtu "${mtu}"
# TX Queue Length support
local len=
eval len=\$txqueuelen_${IFVAR}
- [ -n "${len}" ] && ip link set qlen "${len}" dev "${IFACE}"
+ [ -n "${len}" ] && ip link set "${IFACE}" txqueuelen "${len}"
local tunnel=
eval tunnel=\$iptunnel_${IFVAR}
@@ -198,7 +198,7 @@ iproute2_pre_start()
metric=1000
ebegin "Creating tunnel ${IFVAR}"
- ip tunnel add ${tunnel} name "${IFACE}"
+ ip tunnel add ${tunnel} name dev "${IFACE}"
eend $? || return 1
_up
fi
@@ -234,7 +234,7 @@ iproute2_post_stop()
if [ "${IFACE}" != "sit0" ]; then
if [ -n "$(ip tunnel show "${IFACE}" 2>/dev/null)" ]; then
ebegin "Destroying tunnel ${IFACE}"
- ip tunnel del "${IFACE}"
+ ip tunnel del dev "${IFACE}"
eend $?
fi
fi