#!/bin/sh | |
gsw_start(){ | |
MAX_WAIT=20 # 20s | |
STATE=$(uci get lynq_uci.sdk_ready 2>/dev/null) | |
count=0 | |
while [ "$STATE" != "0" ] && [ $count -lt $MAX_WAIT ]; do | |
sleep 1 | |
STATE=$(uci get lynq_uci.sdk_ready 2>/dev/null) | |
count=$((count + 1)) | |
echo "wait sdk ready count:$count" > /dev/kmsg | |
done | |
echo "GSW oemapp start" > /dev/kmsg | |
/oemapp/start_oemapp.sh & | |
} | |
if [ -f /oemapp/start_oemapp.sh ];then | |
gsw_start | |
fi | |