diff options
Diffstat (limited to 'main/bonding')
-rw-r--r-- | main/bonding/APKBUILD | 4 | ||||
-rwxr-xr-x | main/bonding/bonding.pre-up | 9 |
2 files changed, 8 insertions, 5 deletions
diff --git a/main/bonding/APKBUILD b/main/bonding/APKBUILD index f77880b768..4cdb755f25 100644 --- a/main/bonding/APKBUILD +++ b/main/bonding/APKBUILD @@ -5,7 +5,7 @@ pkgname=bonding pkgver=2.6 -pkgrel=1 +pkgrel=2 pkgdesc="Scripts for network interface bonding" url="http://wiki.alpinelinux.org/wiki/Bonding" arch="noarch" @@ -38,6 +38,6 @@ package() { done } -md5sums="8feef9949a42f0a84418f785827c1fd2 bonding.pre-up +md5sums="e5b1ba826edd950bcf7bedf8cd550e9e bonding.pre-up 68e64f483be3f8730a4c522f1e63e92d bonding.up c5f6d07415118aa21d8e4730f9f18cab bonding.post-down" diff --git a/main/bonding/bonding.pre-up b/main/bonding/bonding.pre-up index 69f6fbe261..17f27070cc 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 |