From f60ec1546ca4ef3c4f615ee8184699847274733f Mon Sep 17 00:00:00 2001 From: Jouke Witteveen Date: Fri, 12 Oct 2012 15:13:04 +0200 Subject: 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. --- src/connections/bond | 3 ++- src/network | 6 ------ 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'src') 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) -- cgit v1.2.3-24-g4f1b