The usage of a “wait” or “sleep” is the “Last Weapon of a deparate Programmer”.
Some service (openvpn ??) obviously depends upon working WAN connection, and is broken, in case not having WAN, when started. Possible to try the “dirty hack” proposed, but delay in rc.local might not work, as (almost all) other services are started before already.
Clean solution: To introduce a check for running WAN. Which can be done by pinging google.com. dnsmasq and other standard services are not sensible to non-existing WAN, so this usually works.
Most likely to introduce this check before openvpn is started.
Verify before doing all this: Does problem also exists, in case openvpn disabled ?