]> TLD Linux GIT Repositories - rc-scripts.git/blobdiff - lib/ifdown
- merged changes from PLD, all TLD changes and fixes are kept
[rc-scripts.git] / lib / ifdown
index 73df49060c9d023dd6f36bea0be1db6e2280f57f..09262e1c47ced4b5ab61802a67460368f709472f 100755 (executable)
@@ -3,6 +3,8 @@
 #
 PATH=/sbin:/usr/sbin:/bin:/usr/bin
 
+run_pre_down() { :; }
+
 . /etc/sysconfig/network
 . /etc/rc.d/init.d/functions
 . /lib/rc-scripts/functions.network
@@ -43,6 +45,9 @@ source_config
 # set all major variables
 setup_ip_param
 
+# anything you need done first
+run_pre_down
+
 OTHERSCRIPT="/lib/rc-scripts/ifdown-${DEVICETYPE}"
 
 # shutdown tleds software
@@ -118,11 +123,6 @@ if [ -n "${SUBDEVICE}" ]; then
        ip addr del ${IP4ADDR} label ${SUBDEVICE} dev ${DEVICE}
 else
        LC_ALL=C ip addr flush dev ${DEVICE} 2>&1 | grep -v "Nothing to flush"
-
-    if is_yes "$SLAVE"; then
-        ip link set ${DEVICE} nomaster
-    fi
-
        ip link set ${DEVICE} down
 fi