Use Debian-style networking only on Ubuntu.
Don't depend on service networking restart for restart
(it's a no-op on current Ubuntu).
Check accesspoint before deciding we're actually bound.
Check the Associated line before deciding we're bound to an AP.
Don't remove persistent file when re-setting the same scheme.