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 @@ -306,24 +306,19 @@ case "$CMD" in
306 done 306 done
307 307
308 if [[ "$IS_SLAVE" = 0 ]]; then 308 if [[ "$IS_SLAVE" = 0 ]]; then
309 -  
310 BRIDGE_IN_USE=0 309 BRIDGE_IN_USE=0
311 VLAN_IN_USE=0 310 VLAN_IN_USE=0
312 VLAN_N_BRIDGE_IN_USE=0 311 VLAN_N_BRIDGE_IN_USE=0
313 -  
314 for VLAN_N_BRIDGE in "${!VLAN_N_BRIDGE_VARIABLE}"; do 312 for VLAN_N_BRIDGE in "${!VLAN_N_BRIDGE_VARIABLE}"; do
315 parse_vlan_subvlan_bridge "${VLAN_N_BRIDGE}" 313 parse_vlan_subvlan_bridge "${VLAN_N_BRIDGE}"
316 if [[ "$LINE" = "$VLAN_N_BRIDGE" ]]; then 314 if [[ "$LINE" = "$VLAN_N_BRIDGE" ]]; then
317 BRIDGE_IN_USE=1 315 BRIDGE_IN_USE=1
318 VLAN_IN_USE=1 316 VLAN_IN_USE=1
319 VLAN_N_BRIDGE_IN_USE=1 317 VLAN_N_BRIDGE_IN_USE=1
320 -  
321 elif [[ "$BRNAME" = "$OLD_BRNAME" ]]; then 318 elif [[ "$BRNAME" = "$OLD_BRNAME" ]]; then
322 BRIDGE_IN_USE=1 319 BRIDGE_IN_USE=1
323 -  
324 elif [[ "$VLANNAME" = "$OLD_VLANNAME" ]]; then 320 elif [[ "$VLANNAME" = "$OLD_VLANNAME" ]]; then
325 VLAN_IN_USE=1 321 VLAN_IN_USE=1
326 -  
327 fi 322 fi
328 done 323 done
329 324
@@ -370,12 +365,15 @@ case "$CMD" in @@ -370,12 +365,15 @@ case "$CMD" in
370 echo FULL_PARVLAN_NAME $FULL_PARVLAN_NAME 365 echo FULL_PARVLAN_NAME $FULL_PARVLAN_NAME
371 echo D1Q_IFACE $D1Q_IFACE 366 echo D1Q_IFACE $D1Q_IFACE
372 ## 367 ##
373 - if [[ "`ip link show | grep "$VLAN"`" = "" ]]; then #should we create a new parent vlan? 368 + if [[ "`ip link show | grep "$FULL_PARVLAN_NAME"`" = "" ]]; then #should we create a new parent vlan?
374 echo "ip link add link $D1Q_IFACE name $FULL_PARVLAN_NAME type vlan id $VLAN" #vlan in bond 369 echo "ip link add link $D1Q_IFACE name $FULL_PARVLAN_NAME type vlan id $VLAN" #vlan in bond
  370 + echo "ip link set dev $FULL_PARVLAN_NAME up"
375 fi 371 fi
376 echo "ip link add link $FULL_PARVLAN_NAME name $FULL_VLAN_NAME type vlan id $SUBVLAN" #subvlan in vlan 372 echo "ip link add link $FULL_PARVLAN_NAME name $FULL_VLAN_NAME type vlan id $SUBVLAN" #subvlan in vlan
  373 + echo "ip link set dev $FULL_VLAN_NAME up"
377 else 374 else
378 echo "ip link add link $D1Q_IFACE name $FULL_VLAN_NAME type vlan id $VLANNAME" #vlan in bond 375 echo "ip link add link $D1Q_IFACE name $FULL_VLAN_NAME type vlan id $VLANNAME" #vlan in bond
  376 + echo "ip link set dev $FULL_VLAN_NAME up"
379 fi 377 fi
380 fi 378 fi
381 fi 379 fi
@@ -396,11 +394,13 @@ case "$CMD" in @@ -396,11 +394,13 @@ case "$CMD" in
396 if [[ "$OLD_BRNAME" = "" ]]; then #is this vlan nave been already enslaved? 394 if [[ "$OLD_BRNAME" = "" ]]; then #is this vlan nave been already enslaved?
397 #brctl addif "$BRNAME" "$FULL_VLANNAME" 395 #brctl addif "$BRNAME" "$FULL_VLANNAME"
398 echo "ip link set "$FULL_VLAN_NAME" master "$BRNAME 396 echo "ip link set "$FULL_VLAN_NAME" master "$BRNAME
  397 + echo "ip link set dev $BRNAME up"
399 else 398 else
400 #brctl delif "$OLD_BRNAME" "FULL_VLANNAME" 399 #brctl delif "$OLD_BRNAME" "FULL_VLANNAME"
401 echo "ip link set "$FULL_VLAN_NAME" nomaster" 400 echo "ip link set "$FULL_VLAN_NAME" nomaster"
402 #brctl addif "$BRNAME" "$FULL_VLANNAME" 401 #brctl addif "$BRNAME" "$FULL_VLANNAME"
403 echo "ip link set "$FULL_VLAN_NAME" master "$BRNAME 402 echo "ip link set "$FULL_VLAN_NAME" master "$BRNAME
  403 + echo "ip link set dev $BRNAME up"
404 fi 404 fi
405 fi 405 fi
406 fi 406 fi