From a24839b747f152dbc7ddf8f21ebfa7aae474d13e Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Mon, 11 Mar 2013 19:40:35 +0100 Subject: connections/vlan: fix BindsToInterfaces length calculation ${#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 --- src/lib/connections/vlan | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/lib') 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 -- cgit v1.2.3-24-g4f1b