On the topic of profiles, if Arch ever gets official wireless setup, whether through 'network' or a seperate daemon, I would love to see it based around the idea of profiles. That, however, is for those people in charge to decide
]]>it uses /etc/conf.d/ndiswrapper for configuration settings (essid, and whatnot)
/etc/rc.d/ndiswrapper uses this to configure wlan0 (which is always used by ndiswrapper) which just uses iwconfig and ifconfig wlan0 up
i then added wlan0 to my network INTERFACES in rc.conf and wlan0="dhcp", then simply put the ndiswrapper module before network.
yeah mine could use some work... for instance - if multiple wireless interfaces, mine forces all to use the same essid....
I may revamp this a bit... maybe set it up to work with all wireless using some of your logic.
perhaps /etc/conf.d/wireless.${INTERFACE_NAME} or even /etc/conf.d/wireless.${PROFILE_NAME} (using your system)... a setting in rc.conf, such as WIRELESS_INTERFACES=() or WIRELESS_PROFILES=() would then be very simple.
yes, I think I like the idea of wireless profiles much better. you can browse to my repo (in my signature) and check out the ndiswrapper package and see what you think...
]]>wireless script (Both files go in /etc/rc.d/)
Setup is as follows (this text is also in the configuration file)
To get started, copy the last profile and give it a name
Replace *) with <profile_name>), such as:
school_wireless)
You must set IFOPTS for each profile following the standard of /etc/rc.conf network interfaces
IFOPTS="dhcp"
IFOPTS="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
...otherwise it WILL fail
After creating a profile, you must add some lines to /etc/rc.conf, such as
wlan0="home"
eth1="school_wireless"
WIRELESS=(wlan0 eth1)
...where "home" and "school_wireless" are the default wireless profiles for those devices
The Wireless script will detect whether the devices are present and will succeed if at least one device connects
To switch to another profile once running, use the following syntax
/etc/rc.d/wireless switch <device_name> <profile_name>
such as:
/etc/rc.d/wireless switch wlan0 school_wireless
Note: this does not change the default profile for the device
My purpose for creating this was that my card wasnt supported by pcmcia-cs, wlan-ng, etc and it has the added benefit that it should work for any wireless card as long as that card supports iwconfig
Please, any comments,suggestions,fixes,etc are welcome.
DISCLAIMER:
This was created for my own personal use and I have tested it as much as humanly possible, but it is not guaranteed to work.
Just trying to help the community