I would like to register a callback script, which would fire after DHCP acknowledge.
Polling is an option...
Is it possible at all, without driver/kernel modification?
I would like to register a callback script, which would fire after DHCP acknowledge.
Polling is an option...
Is it possible at all, without driver/kernel modification?
The script below basically polls for output of ip addr. Once there is something , the while loop terminates, and moves on to launch whatever else you specify. Replace wlan0 with your wireless interface, and zenity --info part with whatever script you want to run. You may want to use exec /path/to/script.sh arg1 arg2 to replace the process.
#!/bin/bash
wifi_info=$(ip -4 -o addr show wlan0 )
while [ -z "$wifi_info" ];
do
wifi_info=$(ip -4 -o addr show wlan0 )
sleep 0.25
done
zenity --info --text="WE'RE ONLINE!!!"