Hi >Please add a hotplug.d/net script to automatically start wpasupplicant for new >interfaces. The system ifplugd uses is excellent; the hotplug script calls the >/etc/init.d/ifplugd script with an extra interface parameter to keep starting >code central, and /etc/default/ifplugd defines what interfaces to start at >boottime and what at plug-in time.
Yes, I must agree, that would be really cool. So I looked at your wpasupplicant.hotplug script and it looks OK, but I would rather see the driver detection part moved to the init.d script. This way both the startup interfaces and the hotplugged interfaces can benefit from the driver detection. Also when (or if) wpasupplicant gets detection support only the init.d script needs modification. There is one annoying thing about ifplugd and that is the starting of static interfaces as boot time because hotplug detects them before the init.d script is run. Which is bug #287512. I created a new init.d script for wpasupplicant which adds the same functionality as init.d/ifplugd. It requires a new default/wpasupplicant: INTERFACES="wlan0 ath0" would start wpasupplicant for this list of interfaces and ignores them when hotplugged (as wpasupplicant should already be running). HOTPLUG_INTERFACES="all" starts all other hotplugged interfaces after it checks if the interface is indeed wireless. For both cases init.d/wpasupplicant start INTERFACE is called. Other commands are "stop INTERFACE" and "status INTERFACE". If the interface is omitted then the action applies to INTERFACES from default. Kyle, as maintainer, what do you think? I am using this script (along with the modified init.d/ifplugd as in bug #287512) to successfully configure my network configuration automatically using: hotplug, ifplugd, wpasupplicant and guessnet. Hotplug for driver loading and starting ifplugd (both wired and wireless) and wpasupplicant (wireless only). If wpasupplicant authenticates then ifplugd does ifup on the interface. Guessnet works out where we are and usually starts dhcp. What still needs to be done is (if Kyle wants this): * Finish the detection function in the init.d script for the missing drivers. I only use ndiswrapper so I can't test it. Maybe ask on debian-laptop? * Modify debconf to support the new functionality. * Maybe add support for /sys/class/net style detection next to /proc/net/wireless? Same goes for driver detection. Cheers, -Olaf
wpasupplicant
Description: application/shellscript
wpasupplicant.hotplug
Description: application/shellscript
# /etc/default/wpasupplicant INTERFACES="" HOTPLUG_INTERFACES="all"