Wait for network readiness

This change introduces a network readiness check into the bash script.
It is useful to have this occur when running the script at boot time,
which can sometimes precede wireless networks being available.