opt/ndiswrapper/wlan
2006-02-23 15:26:10 +00:00

30 lines
530 B
Bash

#!/bin/sh
#
# /etc/rc.d/wlan: start/stop wireless network
#
case $1 in
start)
/sbin/modprobe ndiswrapper
/usr/sbin/iwconfig wlan0 mode Managed
/usr/sbin/iwconfig wlan0 key restricted s:xxxxxxxxxxxxx
/usr/sbin/iwconfig wlan0 essid xxxxxxxx
/sbin/ifconfig wlan0 xxx.xxx.xxx.xxx netmask 255.255.255.xxx
/sbin/route add default gw xxx.xxx.xxx.xxx
;;
stop)
/sbin/ifconfig wlan0 down
/sbin/modprobe -r ndiswrapper
;;
restart)
$0 stop
sleep 2
$0 start
;;
*)
echo "usage: $0 [start|stop|restart]"
;;
esac
# End of file