summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/examples/bonding9
-rw-r--r--src/connections/bond6
2 files changed, 12 insertions, 3 deletions
diff --git a/docs/examples/bonding b/docs/examples/bonding
new file mode 100644
index 0000000..7b70d46
--- /dev/null
+++ b/docs/examples/bonding
@@ -0,0 +1,9 @@
+CONNECTION="bond"
+DESCRIPTION='Bond Interface'
+INTERFACE='bond0'
+IP='static'
+ADDR="10.0.0.1"
+NETMASK="255.0.0.0"
+BOND_INTERFACES=("eth0" "eth2")
+SKIPNOCARRIER="yes"
+
diff --git a/src/connections/bond b/src/connections/bond
index 6ba463e..ea6af77 100644
--- a/src/connections/bond
+++ b/src/connections/bond
@@ -14,8 +14,8 @@ bond_up() {
bring_interface up "$INTERFACE"
"$CONN_DIR/ethernet" up "$1"
- for slave in ${SLAVE_INTERFACES[@]}; do
- bring_interface up "$INTERFACE"
+ for slave in "${SLAVE_INTERFACES[@]}"; do
+ bring_interface up "$slave"
$IFENSLAVE $INTERFACE $slave
done
@@ -25,7 +25,7 @@ bond_up() {
bond_down() {
load_profile "$1"
- for slave in ${SLAVE_INTERFACES[@]}; do
+ for slave in "${SLAVE_INTERFACES[@]}"; do
$IFENSLAVE $INTERFACE -d $slave
done