[gobolinux-users] Gobolinux and ipw3945

Andy Feldman nereusren at gmail.com
Sun Nov 4 08:10:02 NZDT 2007


On Saturday 03 November 2007 13:17, Daniele Maccari wrote:
> Thanks for the help, I'm going to try it out just now :D
> I didn't know about the preup and postdown functions, good to know :p
> Just out of curiosity, what does the command in your postdown do?

It just ends wpa_supplicant the nice way. If you kill the process directly, it 
leaves behind a lock file and won't start again until you remove it. Before I 
learned about wpa_cli I needed these two lines instead:

killall wpa_supplicant
rm -rf /var/run/wpa_supplicant

The post-down function needs to be there because otherwise the pre-up function 
will keep trying to run new instances of wpa_supplicant every time I bring 
the interface up.

Having those two functions instead of putting a single wpa_supplicant line in 
BootUp means when I do StopTask Network and StartTask Network, it is also 
stopping and restarting the wpa_supplicant. When I was experimenting with the 
supplicant settings I found this much more convenient than restarting it as a 
spearate step in betwen bringing the interface down and up.

-Andy

> Andy Feldman ha scritto:
> [...] 
> > function ath0_PreUp() {
> >    echo "Enabling WPA Supplicant, please wait..."
> >    wpa_supplicant -i ath0 -c /System/Settings/wpa_supplicant.conf -D wext
> > -B sleep 5s #this gives the supplicant time to initialize
> > }
> >
> > function ath0_PostDown() {
> >    wpa_cli -i ath0 terminate 1>/dev/null
> > }


More information about the gobolinux-users mailing list