summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/lib/connections/bond3
-rw-r--r--src/lib/connections/bridge3
-rw-r--r--src/lib/connections/dummy3
-rw-r--r--src/lib/connections/tunnel3
-rw-r--r--src/lib/connections/tuntap3
-rw-r--r--src/netctl.in2
6 files changed, 11 insertions, 6 deletions
diff --git a/src/lib/connections/bond b/src/lib/connections/bond
index 2909b90..7e4112f 100644
--- a/src/lib/connections/bond
+++ b/src/lib/connections/bond
@@ -2,7 +2,8 @@
. "$SUBR_DIR/ip"
-declare -ag BindsToInterfaces
+# Make sure BindsToInterfaces is set
+BindsToInterfaces=("${BindsToInterfaces[@]}")
bond_up() {
if is_interface "$Interface"; then
diff --git a/src/lib/connections/bridge b/src/lib/connections/bridge
index 1b25f2b..7d05576 100644
--- a/src/lib/connections/bridge
+++ b/src/lib/connections/bridge
@@ -2,7 +2,8 @@
. "$SUBR_DIR/ip"
-declare -ag BindsToInterfaces
+# Make sure BindsToInterfaces is set
+BindsToInterfaces=("${BindsToInterfaces[@]}")
bridge_up() {
if is_interface "$Interface"; then
diff --git a/src/lib/connections/dummy b/src/lib/connections/dummy
index 5a12d1e..8726d86 100644
--- a/src/lib/connections/dummy
+++ b/src/lib/connections/dummy
@@ -2,7 +2,8 @@
. "$SUBR_DIR/ip"
-declare -ag BindsToInterfaces
+# Make sure BindsToInterfaces is set
+BindsToInterfaces=("${BindsToInterfaces[@]}")
dummy_up() {
if is_interface "$Interface"; then
diff --git a/src/lib/connections/tunnel b/src/lib/connections/tunnel
index ab62cc7..9ed2383 100644
--- a/src/lib/connections/tunnel
+++ b/src/lib/connections/tunnel
@@ -2,7 +2,8 @@
. "$SUBR_DIR/ip"
-declare -ag BindsToInterfaces
+# Make sure BindsToInterfaces is set
+BindsToInterfaces=("${BindsToInterfaces[@]}")
tunnel_up() {
if is_interface "$Interface"; then
diff --git a/src/lib/connections/tuntap b/src/lib/connections/tuntap
index 2c00839..0191ae0 100644
--- a/src/lib/connections/tuntap
+++ b/src/lib/connections/tuntap
@@ -2,7 +2,8 @@
. "$SUBR_DIR/ip"
-declare -ag BindsToInterfaces
+# Make sure BindsToInterfaces is set
+BindsToInterfaces=("${BindsToInterfaces[@]}")
tuntap_up() {
if is_interface "$Interface"; then
diff --git a/src/netctl.in b/src/netctl.in
index 6babecf..dc19ab0 100644
--- a/src/netctl.in
+++ b/src/netctl.in
@@ -111,7 +111,7 @@ unit_enable() {
echo ".include @systemdsystemunitdir@/netctl@.service" > "$unit"
echo -e "\n[Unit]" >> "$unit"
[[ -n $Description ]] && echo "Description=$Description" >> "$unit"
- [[ -v BindsToInterfaces ]] || BindsToInterfaces=$Interface
+ declare -p BindsToInterfaces &> /dev/null || BindsToInterfaces=$Interface
if (( ${#BindsToInterfaces[@]} )); then
: ${InterfaceRoot=sys/subsystem/net/devices/}
printf "BindsTo=$(sd_escape "$InterfaceRoot")%s.device\n" \