Browse Source

Fixed up-ing of bridges without slaves

Dmitry Yu Okunev 7 years ago
parent
commit
cc79df1af8
1 changed files with 1 additions and 2 deletions
  1. 1 2
      ipw

+ 1 - 2
ipw

@@ -539,18 +539,17 @@ case "$CMD" in
 
 					if ! iface_isexists "$BRNAME"; then #do this bridge exists?
 						ip link add "$BRNAME" type bridge
+						ip link set dev "$BRNAME" up
 					fi
 
 					if [[ "$VLAN" != "" ]]; then
 						OLD_BRNAME="`get_brname_byslave "$FULL_VLAN_NAME"`"
 						if [[ "$OLD_BRNAME" = "" ]]; then #is this vlan have been already enslaved?
 							ip link set "$FULL_VLAN_NAME" master "$BRNAME"
-							ip link set dev "$BRNAME" up
 						else
 							if [[ "$BRNAME" != "$OLD_BRNAME" ]]; then
 								ip link set "$FULL_VLAN_NAME" nomaster
 								ip link set "$FULL_VLAN_NAME" master "$BRNAME"
-								ip link set dev "$BRNAME" up
 							fi
 						fi
 					fi