Commit fe4d8a55 authored by Joanne Hugé's avatar Joanne Hugé

playbook/ors: check hardware first in get-sdr-info

parent 7b46d0ee
#!/bin/bash
ORS="$(hostname | sed 's/ors\(.*\)/\1/g')"
IPRODUCT="$(lsusb -d 0403:6014 -v 2> /dev/null |sed -n 's/^ iProduct.*ORS \(.*\)$/\1/gp')"
ISERIAL="$(lsusb -d 0403:6014 -v 2> /dev/null |sed -n 's/^ iSerial *[0-9]* \(.*\)$/\1/gp')"
case "$ORS" in
if [ -z "$IPRODUCT" ]; then
ORS="$(hostname | sed 's/ors\(.*\)/\1/g')"
case "$ORS" in
0)
TDD="TDD";BAND="B39";VERSION="3.2";ISERIAL="A0";;
1)
......@@ -205,12 +208,8 @@ case "$ORS" in
TDD="TDD";BAND="B39";VERSION="4.4";ISERIAL="E7";;
*)
TDD="UNKNOWN";BAND="UNKNOWN";VERSION="UNKNOWN";ISERIAL="UNKNOWN";;
esac
if [[ "$TDD" == "UNKNOWN" ]]; then
IPRODUCT="$(lsusb -d 0403:6014 -v 2> /dev/null |sed -n 's/^ iProduct.*ORS \(.*\)$/\1/gp')"
ISERIAL="$(lsusb -d 0403:6014 -v 2> /dev/null |sed -n 's/^ iSerial *[0-9]* \(.*\)$/\1/gp')"
test -z "$IPRODUCT" && IPRODUCT="TDDUNKNOWN 3.2";
esac
else
test -z "$ISERIAL" && ISERIAL="UNKNOWN";
TDD="${IPRODUCT[@]:0:3}"
IPRODUCT="${IPRODUCT[@]:3}"
......
ee08d5e3709ea1f504946fa5665cc01586503cd126aebdf171e160879b37be79 -
a4d5797927f9921b315c6dfcb04bda8bd04ff9eabe892822a46b8b6c75c8551e -
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment