# wait for process to starttwait=0sprocess=printf "%.15s" "$process"tstat=hciprocstatus -p $process |grep $sprocess | awk '{ print $2 }'while [ "$tstat" != "running" ]dosleep 2 ; twait=expr $twait + 2if [ $twait -gt $waitseconds ]; then break ; fitstat=hciprocstatus -p $process |grep $sprocess | awk '{ print $2 }'done# did we ever get a status?if [ "$tstat" = "running" ]; thenout="started $process"rcode=0elseif [ -z "$out" ] ; thenout="hciconnstatus | grep $sprocess error starting $process"fircode=8fi