Bug #3364

Updated by Giovanni Bezicheri over 4 years ago

CoovaChilli executes a dns resolution test on google (www.google.it). If it fails CoovaChilli does not start because it cannot work without a network connection.
This bug triggers when the system executes CoovaChilli init script while connectivity is not being ready.
The workaround is to introduce some retry attempts, like following:

<pre>
@@ -47,8 +47,17 @@

check_required

- ping -c 1 www.google.it -W 5 > /dev/null 2> /dev/null
- retval=$?
+ #Start hotspot service ONLY if connectivity is present. Worst case: 15 seconds to wait
+ attempts=0
+ retval=1
+ while [ $retval -ne 0 ] && [ $attempts -lt 15 ]
+ do
+ ping -c 1 www.google.it > /dev/null 2> /dev/null
+ retval=$?
+ [ $retval -eq 0 ] && break
+ ((attempts++))
+ sleep 1
+ done
[ $retval -eq 0 ] || return $retval

/sbin/modprobe tun >/dev/null 2>&1

</pre>

Back