]> 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 e7b030af98ddbf53c79e102be882646bbb5b59dd..73df49060c9d023dd6f36bea0be1db6e2280f57f 100755 (executable)
@@ -1,6 +1,5 @@
 #!/bin/sh
 #
-#      $Id$
 #
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
@@ -120,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.267402 seconds and 4 git commands to generate.