[arch-projects] [netctl][PATCH] connections/vlan: fix BindsToInterfaces length calculation
Florian Pritz
bluewind at xinu.at
Mon Mar 11 14:40:35 EDT 2013
${array[@]} requires "[@]" to count the array members. Otherwise it will
return the length of the first element which will hardly ever be 1.
Signed-off-by: Florian Pritz <bluewind at xinu.at>
---
src/lib/connections/vlan | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lib/connections/vlan b/src/lib/connections/vlan
index 86d1a2d..e5edf4a 100644
--- a/src/lib/connections/vlan
+++ b/src/lib/connections/vlan
@@ -3,7 +3,7 @@
. "$CONN_DIR/ethernet"
vlan_up() {
- if [[ ${#BindsToInterfaces} -ne 1 ]]; then
+ if [[ ${#BindsToInterfaces[@]} -ne 1 ]]; then
report_error "No unique physical device for VLAN interface '$Interface' specified"
return 1
fi
--
1.8.1.5
More information about the arch-projects
mailing list