Skip to content

Commit

Permalink
Fix default interface bindings (third time)
Browse files Browse the repository at this point in the history
The declare builtin defaults to making variables local.

Previous attempts:
711c464
e821082
  • Loading branch information
joukewitteveen committed Jun 16, 2013
1 parent 4d8cb70 commit feb669f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/lib/connections/bond
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
. "$SUBR_DIR/ip"

: ${IFENSLAVE:=ifenslave}
declare -a BindsToInterfaces
declare -ag BindsToInterfaces

bond_up() {
if is_interface "$Interface"; then
Expand Down
6 changes: 3 additions & 3 deletions src/lib/connections/bridge
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
. "$SUBR_DIR/ip"

: ${BRCTL:=brctl}
declare -a BindsToInterfaces
declare -ag BindsToInterfaces

bridge_up() {
if is_interface "$Interface"; then
Expand All @@ -30,8 +30,8 @@ bridge_up() {

bridge_down() {
for member in "${BindsToInterfaces[@]}"; do
ip link set "$member" promisc off down
$BRCTL delif "$Interface" "$member"
ip link set "$member" promisc off down
$BRCTL delif "$Interface" "$member"
done

ip_unset
Expand Down
2 changes: 1 addition & 1 deletion src/lib/connections/tunnel
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

. "$SUBR_DIR/ip"

declare -a BindsToInterfaces
declare -ag BindsToInterfaces

tunnel_up() {
if is_interface "$Interface"; then
Expand Down
2 changes: 1 addition & 1 deletion src/lib/connections/tuntap
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

. "$SUBR_DIR/ip"

declare -a BindsToInterfaces
declare -ag BindsToInterfaces

tuntap_up() {
if is_interface "$Interface"; then
Expand Down

0 comments on commit feb669f

Please sign in to comment.