diff --git a/openwrt/viwib-2-configure.sh b/openwrt/viwib-2-configure.sh index 3649edb..688727b 100755 --- a/openwrt/viwib-2-configure.sh +++ b/openwrt/viwib-2-configure.sh @@ -108,25 +108,6 @@ uci delete wireless.radio0.disabled uci commit -# Need to reboot to restore /etc/resolv.conf -reboot - -EOF - -# ensure viwib is back -# ensure viwib network is up and running - bridge takes a bit of time -# ensure viwib gives out ipv6 address -# Found: 30s is not enough for full reconfiguration -echo "Public VPN key: ${id} ${public_key}" - -sleep 60 - -# change to ipv6 -viwib_ip=${my_lan_ip} - -ping -c5 ${viwib_ip} - -cat < ${viwib_hostname}.public_key + +# change to ipv6 +viwib_ip=${my_lan_ip} + +while ! ping -c5 ${viwib_ip}; do + echo "Waiting for viwib ${id}" + sleep 2 +done