done
fi
+if [ -e /tmp/vlan.info ]; then
+ . /tmp/vlan.info
+ if [ "$netif" = "$phydevice" ]; then
+ if [ "$netif" = "$bondname" ] && [ -n "$DO_BOND_SETUP" ] ; then
+ : # We need to really setup bond (recursive call)
+ elif [ "$netif" = "$teammaster" ] && [ -n "$DO_TEAM_SETUP" ] ; then
+ : # We need to really setup team (recursive call)
+ else
+ netif="$vlanname"
+ use_vlan='true'
+ fi
+ fi
+fi
+
# bridge this interface?
if [ -e /tmp/bridge.info ]; then
. /tmp/bridge.info
: # We need to really setup bond (recursive call)
elif [ "$netif" = "$teammaster" ] && [ -n "$DO_TEAM_SETUP" ] ; then
: # We need to really setup team (recursive call)
+ elif [ "$netif" = "$vlanname" ] && [ -n "$DO_VLAN_SETUP" ]; then
+ : # We need to really setup vlan (recursive call)
else
netif="$bridgename"
use_bridge='true'
done
fi
-if [ -e /tmp/vlan.info ]; then
- . /tmp/vlan.info
- if [ "$netif" = "$phydevice" ]; then
- if [ "$netif" = "$bondname" ] && [ -n "$DO_BOND_SETUP" ] ; then
- : # We need to really setup bond (recursive call)
- elif [ "$netif" = "$teammaster" ] && [ -n "$DO_TEAM_SETUP" ] ; then
- : # We need to really setup team (recursive call)
- else
- netif="$vlanname"
- use_vlan='true'
- fi
- fi
-fi
-
# disable manual ifup while netroot is set for simplifying our logic
# in netroot case we prefer netroot to bringup $netif automaticlly
[ -n "$2" -a "$2" = "-m" ] && [ -z "$netroot" ] && manualup="$2"
DO_BOND_SETUP=yes ifup $bondname -m
elif [ "$ethname" = "$teammaster" ] ; then
DO_TEAM_SETUP=yes ifup $teammaster -m
+ elif [ "$ethname" = "$vlanname" ]; then
+ DO_VLAN_SETUP=yes ifup $vlanname -m
else
linkup $ethname
fi
linkup "$phydevice"
fi
ip link add dev "$vlanname" link "$phydevice" type vlan id "$(get_vid $vlanname)"
+ ip link set "$vlanname" up
fi
# setup nameserver