diff options
author | John Klug <john.klug@multitech.com> | 2017-08-31 17:09:38 -0500 |
---|---|---|
committer | John Klug <john.klug@multitech.com> | 2017-08-31 17:09:38 -0500 |
commit | e1173c3263359176022a08fe83de7c77435fedf0 (patch) | |
tree | 2dfea9922c680d4d74c8bbc75f4fe9ffffa8d669 | |
parent | 462c93edfd3edc5b7e85a7282470a3c75b4a7d3a (diff) | |
download | meta-mlinux-e1173c3263359176022a08fe83de7c77435fedf0.tar.gz meta-mlinux-e1173c3263359176022a08fe83de7c77435fedf0.tar.bz2 meta-mlinux-e1173c3263359176022a08fe83de7c77435fedf0.zip |
Allow the timeout in the environment.
-rw-r--r-- | recipes-core/mlinux-scripts/mlinux-scripts-1.1/mlinux-cell-radio-ready | 7 |
1 files changed, 6 insertions, 1 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 index 9930425..42c5cdc 100644 --- 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 @@ -1,7 +1,9 @@ #!/bin/sh +# The timeout can be set in the environment or the +# first parameter. + COUNTER=0 -TIMEOUT=60 if [ $# -gt 1 ]; then echo "usage: $0 [timeout]" @@ -10,6 +12,9 @@ fi [ $# -eq 1 ] && TIMEOUT=$1 +# Set the default TIMEOUT +: ${TIMEOUT:=60} + # Wait for the radio to be ready before continuing while [ $COUNTER -lt $TIMEOUT ]; do TYPE=$(radio-query --type) |