I'm happy because i'm sitting on my couch downstairs writing this email. I attached the wireless script which is to be placed in /etc/sysconfig/network-devices/services and chmoded +x. I have not implemented WPA yet because I havn't had a chance to invade my friend and play with his network yet.
You need to create /etc/sysconfig/network-devices/ssid. The files inside this dir contain the info specific to each network. The file names can either be the name of the ssid or the address of the ap in all capitals. for example, I have "Ciccone" but it could also be "AE:85:35:DE:A4". That is a very useful feature when the ssid is hidden and you would like to scan for your ssid. Unfortunatly I am unable to test scanning here because I am using a mad-wifi card that doesn't support scanning. I'm going to give ndiswrapper a shot later. Your ssid configuration must include ESSID="[your ssid here]" if you used the mac address of your AP for the filename. As of this time I only have one type configured, entering your wep keys with, KEY1="" KEY2="" KEY2="" KEY2="" To sum it all up, Options for the ssid configuration include, ESSID, KEY1, KEY2, KEY3, KEY4, MODE, FREQ, RATE. Note, None of these keys really even need to be set if you're using a totaly unsecure wireless network. All you would have to do is 'touch /etc/sysconfig/network-devices/ssid/[your ssid]' Now on to setting up the interface config. add numbers before the items in ifconfig.[interface] so that the events happen in the correct order. i have 01-wireless and 02-ipv4. in 01-wireless I have, ONBOOT=yes ONHOTPLUG=yes SERVICE=wireless ESSID=Ciccone TYPE=wep You can also set ESSID=scan to search through your ssid definitions in /etc/sysconfig/network-devices/ssid. To find out if your card supports scanning, try and run iwlist [your interface] scan. The locations of the above parameters are arbitrary, you could set KEY1 in ifconfig.[interface]/01-wireless and it would would if you had the same KEY1 over every single network you ever needed to connect to. I've tested this script by being started by the network bootscript and from udev, both work. Enjoy :-) I have tested this script with the lfs network bootscript and with udev running ifup when the card is inserted.
#!/bin/sh ######################################################################## # Begin $network_devices/services/wireless # # Description : Wireless Handler # # Authors : Joe Ciccone - [EMAIL PROTECTED] # # Version : 00.00 # # Notes : # ######################################################################## . /etc/sysconfig/rc . ${rc_functions} . ${IFCONFIG} if [ ! -d "${network_devices}/ssid" ]; then boot_mesg "${network_devices}/ssid does not exist, cannot continue." ${FAILURE} echo_failure exit 1 fi case "${2}" in up) if [ "${ESSID}" = "scan" ]; then for wnet in `iwlist ${1} scan | grep ESSID | cut -d: -f2 | cut -d'"' -f2` \ `iwlist ${1} scan | grep Address | awk '{print $5}'`; do if [ -f "${network_devices}/ssid/${essid}" ]; then ESSID=`basename ${wnet}` break fi done fi if [ -n "${OVERRIDE_ESSID}" ]; then ESSID=${OVERRIDE_ESSID} fi if [ "${ESSID:-scan}" = "scan" ]; then boot_mesg "Could not find a configurable ssid for ${1}, cannot continue." ${FAILURE} echo_failure exit 1 else if [ ! -f "${network_devices}/ssid/${ESSID}" ]; then boot_mesg "Unable to open ${network_devices}/ssid/${ESSID}, cannot continue." ${FAIURE} echo_failure exit 1 fi source ${network_devices}/ssid/${ESSID} fi args1="essid ${ESSID}" if [ -n "${MODE}" ]; then args1="${args1} mode ${MODE}" fi if [ -n "${FREQ}" ]; then args1="${args1} freq ${FREQ}" fi if [ -n "${RATE}" ]; then args1="${args1} rate ${RATE}" fi boot_mesg "Configuring ${1} for essid ${ESSID}" iwconfig ${1} ${args1} evaluate_retval boot_mesg "Setting up ${TYPE} on ${1} ..." case "${TYPE}" in wep) args2="" if [ -n "${KEY1}" ]; then args2="key ${KEY1}" fi if [ -n "${KEY2}" ]; then args2="${args2} key ${KEY2}" fi if [ -n "${KEY3}" ]; then args2="${args2} key ${KEY3}" fi if [ -n "${KEY4}" ]; then args2="${args2} key ${KEY4}" fi iwconfig ${1} ${args2} evaluate_retval ;; *) boot_mesg "Unknown Type ${TYPE}, cannot continue." ${FAILURE} echo_failure exit 1 ;; esac evaluate_retval ;; down) ;; *) echo "Usage: ${0} [interface] {up|down}" exit 1 ;; esac # End $network_devices/services/wireless
-- http://linuxfromscratch.org/mailman/listinfo/blfs-dev FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page