I wanted to have my 770 do dynamic dns update. In the past, due to ignorance of anything better I've just written a shell script that gets cronned every 15 mins or so that sees if anything's changed, and if so updates my IP with curl. But the 770 doesn't have cron.
So I went looking for some sort if interface up hook. /etc/init.d/ was the only place I knew to look - but it turns out that scripts in there just get called when the interfaces go up, not when a wlan connection happens, so that was no dice. I couldn't find anything else, and ended up finding someone had ported a working cron to 770, so for a while I just used that.
Then today, I found out about dbus, which led me to /etc/udhcp, and bingo, that was it. I added a line that calls my dynip script at the appropriate spot in /etc/udhcp/udhcp.script, which seems to be the one that actually runs, and it works great - only checks/updates on wlan connect.
If you have an Apple laptop with Airport this bash line returns the SSID of the current network:
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -I | awk '/ SSID/ {printf $2}'
With that in mind i made a smart homepage script in php. I run it on my local webserver and use it as my homepage.
Given a list of trusted SSID's it will test internet connection and:
There's other ways I could imagine running this, but it should be pretty easy to modify for diferent behavior.