genia-stations: fixes first_sta 000 which evaluated to zero and skipped first item on radio for lf_associate call

This commit is contained in:
Jed Reynolds
2020-03-20 16:29:34 -07:00
parent db14555af3
commit d6c9511607

View File

@@ -28,10 +28,10 @@ function create_batch() {
#echo "radio[$radio] start[$start] num[$num]"
set -x
./lf_associate_ap.pl --mgr $M --radio $radio --action add \
--first_sta $start --num_sta $num \
--first_ip DHCP --ssid ${SSID[0]} \
--security wpa2 --passphrase ${SSID[1]} \
--admin_down_on_add
--first_sta "sta${start}" --num_sta ${num} \
--first_ip DHCP --ssid "${SSID[0]}" \
--security wpa2 --passphrase "${SSID[1]}" \
--admin_down_on_add || exit 1
set +x
}
@@ -39,9 +39,11 @@ sorted=$(for radio in "${!batches[@]}"; do
echo $radio
done | sort)
set -e
for radio in $sorted; do
value="${batches[$radio]}"
hunks=( ${value//,/ } )
create_batch $radio ${hunks[0]} ${hunks[1]}
sleep 1
done