11 Mar
2013
11 Mar
'13
6:40 p.m.
${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@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