#!/bin/bash # This script handles wireless extensions. usage() { echo "Usage: $0 " >&2 exit 1 } [ -z "$1" ] && usage NAME=$1 pickup_defaults pickup_options # configure WEP if [ -x "${IWCONFIG:=$DEFAULT_IWCONFIG}" ]; then # Dunno if $IFACEDIR/default/iwconfig can be of any use xargise_file $IFACEDIR/default/iwconfig "$IWCONFIG $NAME" xargise_file $MYIFACEDIR/iwconfig "$IWCONFIG $NAME" fi # configure WPA if [ -x "${WPA_SUPPLICANT:=$DEFAULT_WPA_SUPPLICANT}" ]; then prof_conf=`profiled_filename $MYIFACEDIR/wpa_supplicant.conf` if [ -s "$prof_conf" ]; then sh -c "sleep 5; exec $WPA_SUPPLICANT -i$NAME${WPA_DRIVER:+ -D$WPA_DRIVER} -c $prof_conf -w" 2>&1>/dev/null & echo $! >/var/run/wpa_supplicant-$NAME.pid fi fi