With -w (watch) mode, poll every 20 seconds and reset the connection if it's been dropped.
loop forever keeping the connection open, resetting it if it drops.
Remove unused Connection classes, dead code.
for an AP no longer visible could interfere with setting new schemes.
when we find a scheme matching the one specified. Fixes a bug where the wrong scheme would be saved to the current file.
After accepting a new scheme and saving it successfully, sometimes, inexplicably, it loops back: Save this scheme for later? (y/N) y Trying to write scheme to /home/akkana/.config/netscheme/.netscheme Use it anyway? (Y/n) I think this was happening when there were two schemes both matching the current essid, because we didn't break out of the loop. Also, if persistent is specified then we shouldn't ask "save this scheme for later?" anyway -- obviously we need to save a persistent scheme.
to an old essid even though we asked for a newer one. I'm still not clear how that can happen.
Create the "current" file properly.
and return a more comprehensible message if wpa_supplicant exits with a nonzero status. Also, don't add an extra newline when adding new schemes to .netscheme.
Also improve the comments for set_scheme, explaining "add" better.
Factor the code that creates and chowns files into one function.
Prepend a blank line to each new configuration.
There were two different versions of the "don't specify the AP" change. Conflicts: netscheme
Don't remove persistent file when re-setting the same scheme.
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.
to a different scheme. Add debugging messages and comments to try to solve the problem of why switching from eth0 to wlan0 doesn't work.
If not debian and no current scheme file, print an error and exit.
which writes the current scheme name to ~/.config/netscheme/current. netscheme -r will try to read that and use it.
When waiting for a wireless connection: loop until iwconfig shows us actually connected. Don't do wireless stuff for wired connections. Catch the mysterious error where the /sys/class device file sometimes isn't there (may related to switching between wired/wireless?) Fix a few code factoring errors (modules not loaded). Add a comment explaining that the misleading Connection class isn't used.
…-- sometimes it mysteriously doesn't exist