Artyom A Anikeev

ability of bringign up was appended

Showing 1 changed file with 6 additions and 6 deletions
... ... @@ -306,24 +306,19 @@ case "$CMD" in
done
if [[ "$IS_SLAVE" = 0 ]]; then
BRIDGE_IN_USE=0
VLAN_IN_USE=0
VLAN_N_BRIDGE_IN_USE=0
for VLAN_N_BRIDGE in "${!VLAN_N_BRIDGE_VARIABLE}"; do
parse_vlan_subvlan_bridge "${VLAN_N_BRIDGE}"
if [[ "$LINE" = "$VLAN_N_BRIDGE" ]]; then
BRIDGE_IN_USE=1
VLAN_IN_USE=1
VLAN_N_BRIDGE_IN_USE=1
elif [[ "$BRNAME" = "$OLD_BRNAME" ]]; then
BRIDGE_IN_USE=1
elif [[ "$VLANNAME" = "$OLD_VLANNAME" ]]; then
VLAN_IN_USE=1
fi
done
... ... @@ -370,12 +365,15 @@ case "$CMD" in
echo FULL_PARVLAN_NAME $FULL_PARVLAN_NAME
echo D1Q_IFACE $D1Q_IFACE
##
if [[ "`ip link show | grep "$VLAN"`" = "" ]]; then #should we create a new parent vlan?
if [[ "`ip link show | grep "$FULL_PARVLAN_NAME"`" = "" ]]; then #should we create a new parent vlan?
echo "ip link add link $D1Q_IFACE name $FULL_PARVLAN_NAME type vlan id $VLAN" #vlan in bond
echo "ip link set dev $FULL_PARVLAN_NAME up"
fi
echo "ip link add link $FULL_PARVLAN_NAME name $FULL_VLAN_NAME type vlan id $SUBVLAN" #subvlan in vlan
echo "ip link set dev $FULL_VLAN_NAME up"
else
echo "ip link add link $D1Q_IFACE name $FULL_VLAN_NAME type vlan id $VLANNAME" #vlan in bond
echo "ip link set dev $FULL_VLAN_NAME up"
fi
fi
fi
... ... @@ -396,11 +394,13 @@ case "$CMD" in
if [[ "$OLD_BRNAME" = "" ]]; then #is this vlan nave been already enslaved?
#brctl addif "$BRNAME" "$FULL_VLANNAME"
echo "ip link set "$FULL_VLAN_NAME" master "$BRNAME
echo "ip link set dev $BRNAME up"
else
#brctl delif "$OLD_BRNAME" "FULL_VLANNAME"
echo "ip link set "$FULL_VLAN_NAME" nomaster"
#brctl addif "$BRNAME" "$FULL_VLANNAME"
echo "ip link set "$FULL_VLAN_NAME" master "$BRNAME
echo "ip link set dev $BRNAME up"
fi
fi
fi
... ...