On Tuesday 15 March 2011 22:24:07 Tormod Volden wrote: > On Tue, Mar 15, 2011 at 12:46 PM, Kel Modderman wrote: > > Can you explain what is actually wrong with the shell code I've been using > > for > > a few years, which stops it from functioning as advertised? > > > > I'm not going to be interested enough to consume time investigating a > > problem > > based on a guess. > > > > Thanks, Kel. > > > > Hi Kel, > > Yes, by analyzing the code I can say what goes wrong: Upon network > interface activation, the action intended for the "post-up" phase is > not executed (because the script is not in any if-post-up.d directory > - it is linked in the if-up.d directory but $PHASE will here be "up). > The action in question is init_wpa_cli() from functions.sh. This > function only does something if $WPA_ACTION_SCRIPT is set. Therefore > if you personally have been using this code for some years without > WPA_ACTION_SCRIPT set, you would not have experienced any problem. > What the "advertised" use for this is, I do not know. But it is > certainly not working as intended. So I will /guess/ ;) there are > users out there who have problems with their WPA_ACTION_SCRIPT setup.
/etc/network/interfaces --- allow-hotplug wlan0 iface wlan0 inet manual wpa-roam /etc/wpa_supplicant/wpa-roam.conf iface default inet dhcp --- # ifup -v wlan0 Configuring interface wlan0=wlan0 (inet) run-parts --verbose /etc/network/if-pre-up.d run-parts: executing /etc/network/if-pre-up.d/bridge run-parts: executing /etc/network/if-pre-up.d/hostapd run-parts: executing /etc/network/if-pre-up.d/wireless-tools run-parts: executing /etc/network/if-pre-up.d/wpasupplicant wpa_supplicant: wait for wpa_cli to attach wpa_supplicant: wpa-driver nl80211,wext (default) wpa_supplicant: /sbin/wpa_supplicant -s -B -P /var/run/wpa_supplicant.wlan0.pid -i wlan0 -W -D nl80211,wext -c /etc/wpa_supplicant/wpa-roam.conf Starting /sbin/wpa_supplicant... wpa_supplicant: creating sendsigs omission pidfile: /lib/init/rw/sendsigs.omit.d/wpasupplicant.wpa_supplicant.wlan0.pid run-parts --verbose /etc/network/if-up.d run-parts: executing /etc/network/if-up.d/000resolvconf run-parts: executing /etc/network/if-up.d/mountnfs run-parts: executing /etc/network/if-up.d/ntpdate run-parts: executing /etc/network/if-up.d/openssh-server run-parts: executing /etc/network/if-up.d/wpasupplicant wpa_supplicant: /sbin/wpa_cli -B -P /var/run/wpa_action.wlan0.pid -i wlan0 -p /var/run/wpa_supplicant -a /sbin/wpa_action Starting /sbin/wpa_cli... # ifdown wlan0 -v Configuring interface wlan0=wlan0 (inet) run-parts --verbose /etc/network/if-down.d run-parts: executing /etc/network/if-down.d/resolvconf run-parts: executing /etc/network/if-down.d/wpasupplicant wpa_supplicant: terminating wpa_cli daemon via pidfile /var/run/wpa_action.wlan0.pid Stopped /sbin/wpa_cli (pid 3707). run-parts --verbose /etc/network/if-post-down.d run-parts: executing /etc/network/if-post-down.d/bridge run-parts: executing /etc/network/if-post-down.d/hostapd run-parts: executing /etc/network/if-post-down.d/wireless-tools run-parts: executing /etc/network/if-post-down.d/wpasupplicant wpa_supplicant: terminating wpa_supplicant daemon via pidfile /var/run/wpa_supplicant.wlan0.pid Stopped /sbin/wpa_supplicant (pid 3660). wpa_supplicant: removing /lib/init/rw/sendsigs.omit.d/wpasupplicant.wpa_supplicant.wlan0.pid > > Upon network deactivation, for the same reasons, kill_wpa_supplicant() > is not run. This I can verify myself even without using WPA: 1. See > that there is a running /sbin/wpa_supplicant process. 2. Deactivate > networking for instance with nm-applet. 3. See that > /sbin/wpa_supplicant, against intended behaviour, is still running and > has therefore not been killed by kill_wpa_supplicant() . In case you > added that logger line, you can see how the ifupdown script is called. > This is not a guess :) This process is started/stopped via D-Bus and has *nothing* to do with the ifupdown shell script glue you are doing your guesswork on. Kel. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org