]> git.pld-linux.org Git - projects/rc-scripts.git/blobdiff - lib/ifdown
Fix bonding and actually enable ETHTOOL_OPTS
[projects/rc-scripts.git] / lib / ifdown
index 55af267d3d21c5d22ce5755fabc3977c230282fa..73df49060c9d023dd6f36bea0be1db6e2280f57f 100755 (executable)
@@ -119,23 +119,9 @@ if [ -n "${SUBDEVICE}" ]; then
 else
        LC_ALL=C ip addr flush dev ${DEVICE} 2>&1 | grep -v "Nothing to flush"
 
-       if [ ${DEVICETYPE} = "bond" ]; then
-               if [ ! -x /sbin/ifenslave ]; then
-                       nls "%s is missing. Can't continue." "/sbin/ifenslave"
-                       exit 1
-               fi
-
-               # get up the bonding device before enslaving
-               if ! check_device_down "${DEVICE}"; then
-                       ip link set ${DEVICE} up
-               fi
-
-               for BSVAR in $(awk '/Slave Interface:/{ print $3}' /proc/net/bonding/${DEVICE}); do
-                       if [ "${BSVAR}" ]; then
-                               ifenslave -d ${DEVICE} $BSVAR
-                       fi
-               done
-       fi
+    if is_yes "$SLAVE"; then
+        ip link set ${DEVICE} nomaster
+    fi
 
        ip link set ${DEVICE} down
 fi
This page took 0.139239 seconds and 4 git commands to generate.