From: Harald Hoyer Date: Wed, 6 Feb 2013 16:56:46 +0000 (+0100) Subject: network/ifup.sh: echo in get_vid() instead of using the return value X-Git-Tag: 026~84 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=39135af15558c9a2af6fcf18a391fb9b120fb5b1;p=thirdparty%2Fdracut.git network/ifup.sh: echo in get_vid() instead of using the return value The return value is module 256, so VLAN ids > 255 could not be returned. --- diff --git a/modules.d/40network/ifup.sh b/modules.d/40network/ifup.sh index 4216fa69d..582278f5b 100755 --- a/modules.d/40network/ifup.sh +++ b/modules.d/40network/ifup.sh @@ -223,10 +223,10 @@ fi get_vid() { case "$1" in vlan*) - return ${1#vlan} + echo ${1#vlan} ;; *.*) - return ${1##*.} + echo ${1##*.} ;; esac } @@ -238,7 +238,7 @@ if [ "$netif" = "$vlanname" ] && [ ! -e /tmp/net.$vlanname.up ]; then else linkup "$phydevice" fi - ip link add dev "$vlanname" link "$phydevice" type vlan id "$(get_vid $vlanname; echo $?)" + ip link add dev "$vlanname" link "$phydevice" type vlan id "$(get_vid $vlanname)" fi # setup nameserver