summaryrefslogtreecommitdiffstats
path: root/main/bonding/bonding.pre-up
diff options
context:
space:
mode:
Diffstat (limited to 'main/bonding/bonding.pre-up')
-rwxr-xr-xmain/bonding/bonding.pre-up9
1 files changed, 6 insertions, 3 deletions
diff --git a/main/bonding/bonding.pre-up b/main/bonding/bonding.pre-up
index 69f6fbe26..17f27070c 100755
--- a/main/bonding/bonding.pre-up
+++ b/main/bonding/bonding.pre-up
@@ -46,7 +46,7 @@ sysfs_add()
done
}
-ifup_slave()
+ifup_once()
{
local v=
[ "$VERBOSITY" = 1 ] && v=-v
@@ -78,7 +78,7 @@ enslave_slaves()
else
# Bring up slave if it is defined in interfaces
# This is usefull to bring up slaves that need extra setup.
- ifup_slave $slave
+ ifup_once $slave
fi
fi
done
@@ -125,8 +125,11 @@ IF_BOND_SLAVES=${IF_BOND_SLAVES:-$IF_SLAVES}
if [ "$IF_BOND_MASTER" ] ; then
BOND_MASTER="$IF_BOND_MASTER"
BOND_SLAVES="$IFACE"
+ if ! [ -e /sys/class/net/$IFACE/master ]; then
+ ifup_once $BOND_MASTER
+ fi
else
- if [ "$IF_BOND_SLAVES" ] ; then
+ if [ "$IF_BOND_SLAVES$IF_BOND_MODE" ]; then
BOND_MASTER="$IFACE"
BOND_SLAVES="$IF_BOND_SLAVES"
fi