On Sat, 2013-11-02 at 10:00 -0700, Adrian Chadd wrote: > right, this makes it clearer. > > What about: > > * the wpa_supplicant rc script only starts/stops one wpa_supplicant instance > * upon ethernet / wlan clone creation, use interface_add to add the > interface to wpa_supplicant > * upon ethernet / wlan clone destruction, use interface_remove > > how's that sound? > > > -adrian
Sounds nice, but firstly we need to figure out this case, and then we can do adding/removing/whatever Without fixing that, it would be possible to see adding/removing/whatever twice. How to reproduce: 1) put debug info into rc.d/wpa_supplicant, a «toto» looks very informative! ↑1 ~ → diff -u /usr/src/etc/rc.d/wpa_supplicant /etc/rc.d/wpa_supplicant --- /usr/src/etc/rc.d/wpa_supplicant 2013-06-19 01:06:53.911196741 +0300 +++ /etc/rc.d/wpa_supplicant 2013-11-02 20:42:02.556222618 +0200 @@ -34,6 +34,8 @@ driver="bsd" fi +echo toto >> /tmp/toto + load_rc_config $name command=${wpa_supplicant_program} zsh: exit 1 diff -u /usr/src/etc/rc.d/wpa_supplicant /etc/rc.d/wpa_supplicant ↑1 ~ → 2) then: service netif restart 3) then: cat /tmp/toto, how many totos do you see? 4) if you are lucky like I am, you can even observe something like this: root 15038 0.0 0.1 21596 6100 - Ss 8:42pm 0:00.16 /usr/sbin/wpa_supplicant -s -B -i wlan0 -c /etc/wpa_supplicant.conf -D bsd -P /var/run/wpa_supplicant/wlan0.pid root 15077 0.0 0.1 21596 6112 - Ss 8:42pm 0:00.12 /usr/sbin/wpa_supplicant -s -B -i wlan0 -c /etc/wpa_supplicant.conf -D bsd -P /var/run/wpa_supplicant/wlan0.pid What was happened? netif tries to setup wlan0 (clone, wpa, dhcp, etc), when wlan0 interface occurs, devd runs another copy of netif.
signature.asc
Description: This is a digitally signed message part