From 40b970420674bc7ce9d347f258b93c59f9f0272d Mon Sep 17 00:00:00 2001 From: John Klug Date: Thu, 31 Aug 2017 17:09:38 -0500 Subject: Allow the timeout in the environment. --- .../mlinux-scripts/mlinux-scripts-1.1/mlinux-cell-radio-ready | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'recipes-core/mlinux-scripts') 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) -- cgit v1.2.3