diff options
author | John Klug <john.klug@multitech.com> | 2017-08-31 12:21:47 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2017-08-31 12:21:47 -0500 |
commit | 0ba1d8a7f5f0814dc0d210b40cdb858cc5400302 (patch) | |
tree | 320368a1585087fccc77524fef818bb1e9c0ff1f /recipes-core/mlinux-scripts/mlinux-scripts-1.1 | |
parent | f8b284c88fa22d848cb1e8719f552442a6c05026 (diff) | |
download | meta-mlinux-0ba1d8a7f5f0814dc0d210b40cdb858cc5400302.tar.gz meta-mlinux-0ba1d8a7f5f0814dc0d210b40cdb858cc5400302.tar.bz2 meta-mlinux-0ba1d8a7f5f0814dc0d210b40cdb858cc5400302.zip |
MTCAP LORA configuration table
Diffstat (limited to 'recipes-core/mlinux-scripts/mlinux-scripts-1.1')
-rw-r--r-- | recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-cell-radio-ready | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-cell-radio-ready b/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-cell-radio-ready new file mode 100644 index 0000000..9930425 --- /dev/null +++ b/recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-cell-radio-ready @@ -0,0 +1,29 @@ +#!/bin/sh + +COUNTER=0 +TIMEOUT=60 + +if [ $# -gt 1 ]; then + echo "usage: $0 [timeout]" + exit 1 +fi + +[ $# -eq 1 ] && TIMEOUT=$1 + +# Wait for the radio to be ready before continuing +while [ $COUNTER -lt $TIMEOUT ]; do + TYPE=$(radio-query --type) + MODEL=$(radio-query --model) + if [ $? == 0 ]; then + echo "Cellular radio is ready." + exit 0 + fi + let COUNTER=COUNTER+1 + + echo "Waiting for radio to come up in order to identify type ..." + + sleep 1 +done + +echo "Cellular radio is not ready." +exit 1 |