diff options
author | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-11-06 15:36:35 +0100 |
---|---|---|
committer | Pau Espin Pedrol <pespin@sysmocom.de> | 2018-11-07 10:23:42 +0000 |
commit | 0c8e950e861c61aec0b794bb4cb9cb763764f7b8 (patch) | |
tree | cb30787f0c146e5be1a80e0ae7e728413b3b3782 /ansible/roles | |
parent | da939e6cdfef0021de9cbd02836977d4915dd083 (diff) |
ansible: gsm-tester: Support power cycling multiple quad modems
uhubctl doesn't support acting on several hubs from same vendor at once.
Change-Id: I01e698c96240130ed6f632f82383f6020d2a3b81
Diffstat (limited to 'ansible/roles')
-rwxr-xr-x | ansible/roles/gsm-tester/templates/quad_modem_power_cycle.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ansible/roles/gsm-tester/templates/quad_modem_power_cycle.sh b/ansible/roles/gsm-tester/templates/quad_modem_power_cycle.sh index 626a04e..f461d81 100755 --- a/ansible/roles/gsm-tester/templates/quad_modem_power_cycle.sh +++ b/ansible/roles/gsm-tester/templates/quad_modem_power_cycle.sh @@ -1,9 +1,15 @@ #!/bin/sh set -ex -uhubctl -p 123456 -a 0 -n 1d50:4002 + +locations="$(uhubctl -n 1d50:4002 | grep "Current status for hub" | awk '{print $5}')" +for l in $locations; do + uhubctl -p 123456 -a 0 -n 1d50:4002 -l $l +done # give a lot of time to discharge capacitors on the board sleep 20 -uhubctl -p 123456 -a 1 -n 1d50:4002 +for l in $locations; do + uhubctl -p 123456 -a 1 -n 1d50:4002 -l $l +done attempts=30 while [ "x$(uhubctl | grep -e 05c6 -e 1199 -c)" != "x{{ gsm_modems }}" ]; do attempts=$(($attempts - 1)) |