]> TLD Linux GIT Repositories - rc-scripts.git/blobdiff - lib/ifdown-bond
- keep script silent if no slaves
[rc-scripts.git] / lib / ifdown-bond
index 1d81ecb548e88f0432e0c6b29a619df6810211ef..80a2cf224bafca00943e19a922447421d52af817 100755 (executable)
@@ -38,7 +38,7 @@ setup_ip_param
 LC_ALL=C ip addr flush dev ${DEVICE} 2>&1 | grep -v "Nothing to flush"
 
 # release slave devices
-for SLAVE_DEV in $(cat /sys/class/net/${DEVICE}/bonding/slaves); do
+for SLAVE_DEV in $(cat /sys/class/net/${DEVICE}/bonding/slaves 2>/dev/null); do
        echo "-${SLAVE_DEV}" > /sys/class/net/${DEVICE}/bonding/slaves
 done