How to find out when wifi is connected?
Is there a way to find out from within a shell script when the wifi connection to a DHCP router has been established? Here's the scenario: on a Yocto-based embedded machine, it takes about 15 seconds after the login prompt appears on the console before the systemd invoked wpa supplicant stuff finally establishes the connection. I'm going to be running a program that needs wlan0 to have a valid IP address as opposed to eth0. I don't want to launch the program until the wifi is connected. So is there something I can poll from a shell script to check that wlan0 has an ip address?
|