#!/bin/sh do=doody #scan #dup|cycle <-- cycle interface #start #stop case "$1" in help) echo $0 - wifi control script, saves me typing echo Usage: $0 [command] echo scan start stop cycle dhcp ssid key channel echo "shorts: r,cyc,dup=cycle sid,id=ssid c,chan=channel" echo " off=stop s=scan" echo key: 10 or 26 hex digits or s:asciikey ;; scan|s) iwlist scan 2>/dev/null ;; start) /etc/rc.d/network start ;; stop|off) ifconfig nds down ;; on) ifconfig nds up ;; dhcp) udhcpc -fq -i nds ;; dup|cycle|cyc) ifconfig nds down ifconfig nds up echo interface nds cycled ;; ssid|sid|essid) iwconfig nds essid $2 echo ESSID: $2 ;; *) #echo wi what? iwconfig nds 2>/dev/null ifconfig | grep inet echo wi help for some. esac