Rogutės Sparnuotos schrieb:
And, after writing the initial question, I've read the man page for wpa_cli: wpa_cli -iwlan0 -a/path/to/wpa_action_script.sh seems to be able to fully replace autowifi, except for logging to syslog. Need to test this more, though.
It doesn't when your AP is broken. I had the following problem: My old AP sometimes would drop the connection, and immediately re-establish it. This lead to the problem that action_script was called twice within less than a second (which in the end got me stupid race conditions).
autowifi is more advanced than wpa_cli: If you get disconnected from the AP, it assumes that you are still connected for a small timeout (default 20 seconds iirc) and only then calls the disconnect event. If you reconnect to the same AP within this timeout, nothing happens. I have had way less trouble with this setup than with wpa_cli. BTW, this trick has been stolen from ifplugd, which also has a timeout before calling the disconnect event.
Attachment:
signature.asc
Description: OpenPGP digital signature