summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJouke Witteveen <j.witteveen@gmail.com>2012-10-12 15:13:04 +0200
committerJouke Witteveen <j.witteveen@gmail.com>2012-10-12 15:16:54 +0200
commitf60ec1546ca4ef3c4f615ee8184699847274733f (patch)
tree1a7ef30efac29fb1e7102122ea730e2e63ffde78 /src
parentba2128f0233c04aea1f5adc425938f78bdd7540e (diff)
downloadnetctl-f60ec1546ca4ef3c4f615ee8184699847274733f.tar.gz
netctl-f60ec1546ca4ef3c4f615ee8184699847274733f.tar.xz
Fix bond connections (FS#31770)
This commit removes an undocumented feature where IFACE_{UP,DOWN} would be evaluated when the interface is brought up or down. This functionality did not work as expected since the interface could potentially be brought up/down more than once in one netcfg invocation. This is apparent in the changes to the bonding code.
Diffstat (limited to 'src')
-rw-r--r--src/connections/bond3
-rw-r--r--src/network6
2 files changed, 2 insertions, 7 deletions
diff --git a/src/connections/bond b/src/connections/bond
index 4b038fd..bc5aa95 100644
--- a/src/connections/bond
+++ b/src/connections/bond
@@ -11,13 +11,14 @@ bond_up() {
else
ip link add dev $INTERFACE type bond
fi
- "$CONN_DIR/ethernet" up "$1"
+ bring_interface up "$INTERFACE"
for slave in "${SLAVE_INTERFACES[@]}"; do
bring_interface up "$slave"
$IFENSLAVE $INTERFACE $slave
done
+ "$CONN_DIR/ethernet" up "$1"
return 0
}
diff --git a/src/network b/src/network
index 639de1b..1aa384c 100644
--- a/src/network
+++ b/src/network
@@ -353,16 +353,10 @@ bring_interface()
local INTERFACE="$2"
case "$1" in
up)
- if ! ( eval $IFACE_UP ); then
- return 1
- fi
ip link set dev "$INTERFACE" up &>/dev/null
timeout_wait "${UP_TIMEOUT:-5}" 'interface_is_up "$INTERFACE"' || return 1
;;
flush|down)
- if ! ( eval $IFACE_DOWN ); then
- return 1
- fi
ip addr flush dev "$INTERFACE" &>/dev/null
;;&
down)