#!/sbin/runscript opts="start stop restart" start() { ebegin "Starting wireless" modprobe r8187 modprobe ieee80211_crypt_wep-rtl ifconfig wlan up ifconfig wlan 192.168.2.8 iwconfig wlan mode ad-hoc iwconfig wlan enc 18419283479182742389457129 iwconfig wlan channel 11 iwconfig wlan essid 1234 # Works with r8187 but not with ndiswrapper iwconfig wlan rate 54M eend $? } stop() { ebegin "Stopping wireless" ifconfig wlan down modprobe -r r8187 modprobe -r ieee80211_crypt_wep-rtl modprobe -r ieee80211_crypt_rtl modprobe -r ieee80211_rtl eend $? } restart() { svc_stop sleep 5 svc_start } # vim:ts=4