All pastes #77035 Raw Edit

Miscellany

public shellscript v1 · immutable
·published 2006-07-02 14:08 UTC
rendered paste body
#!/bin/bash# This script handles wireless extensions.usage(){	echo "Usage: $0 <interface>" >&2	exit 1}[ -z "$1" ] && usageNAME=$1pickup_defaultspickup_options# configure WEPif [ -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 WPAif [ -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	fifi