]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
network/ifup.sh: echo in get_vid() instead of using the return value
authorHarald Hoyer <harald@redhat.com>
Wed, 6 Feb 2013 16:56:46 +0000 (17:56 +0100)
committerHarald Hoyer <harald@redhat.com>
Fri, 8 Feb 2013 15:52:38 +0000 (16:52 +0100)
The return value is module 256, so VLAN ids > 255 could not be returned.

modules.d/40network/ifup.sh

index 4216fa69d7a9c5f28756f9d2e08ce921e4a7da21..582278f5be393cac8db3ea68e2d85018e8744ec7 100755 (executable)
@@ -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