ti-calibrator-wl18xxx: Make bt script compatible with OEM linux

cli is not available on OEM linux, but we can just ignore this part of
the code since what it does it already done at boot-time in OEM linux.

id:376256
(cherry picked from commit b1a8cc203af4281a86f93fbcdefe80391d08c050)
This commit is contained in:
Alexandre Bard 2023-03-17 13:48:34 +01:00 committed by Patrick Walther
parent e473b9341d
commit 471d605f9e
1 changed files with 15 additions and 10 deletions

View File

@ -262,17 +262,22 @@ while getopts a:c:f:hi:m:p:r:s:t: OPT; do
done done
shift $(expr $OPTIND - 1) shift $(expr $OPTIND - 1)
cli set bluez.0.status=2 bluez.1.status=2 if which cli &>/dev/null; then
sleep 1 # CLI is not available on OEM linux and this part of
echo "configure hci interface please wait" # the code is not required.
for i in $(seq 0 240); do
cli set bluez.0.status=2 bluez.1.status=2
sleep 1
echo "configure hci interface please wait"
for i in $(seq 0 240); do
cnt=$(ls /tmp/progress | wc -l) cnt=$(ls /tmp/progress | wc -l)
if [ $cnt -eq 0 ]; then if [ $cnt -eq 0 ]; then
break break
fi fi
echo -n ".." echo -n ".."
sleep 1 sleep 1
done done
fi
btgod_stop btgod_stop