Browse Source

Merge branch 'master' of https://gitlab.ut.mephi.ru/ut/ipw

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

+ 5 - 2
ipw

@@ -493,8 +493,11 @@ case "$CMD" in
 
 			# Creating bond-ifaces
 			if [[ "$D1Q_EXISTS" == 0 ]]; then #make all
-				echo "+$D1Q_IFACE" > /sys/class/net/bonding_masters
-				echo "$MODE" > /sys/class/net/"$D1Q_IFACE"/bonding/mode
+				echo "+$D1Q_IFACE" > /sys/class/net/bonding_masters 2>/dev/null
+
+				if [[ -d /sys/class/net/"$D1Q_IFACE"/bonding ]]; then
+					echo "$MODE" > /sys/class/net/"$D1Q_IFACE"/bonding/mode
+				fi
 
 				for SLAVE in "${!SLAVES_VARIABLE}"; do
 					ip link set dev "$SLAVE" down  #enslaved int should be shutted down