Browse Source

Suppressed few errors

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

+ 5 - 2
ipw

@@ -486,8 +486,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