From cedd81801a46b6c0750f97bfc89e08626f4442c1 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Wed, 30 Apr 2008 09:18:20 +0000 Subject: We should use correct iproute2 commands and fix busybox as it's iproute2 implementation is a little broken. --- net/iproute2.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'net/iproute2.sh') 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 -- cgit v1.2.3