30 lines
530 B
Plaintext
30 lines
530 B
Plaintext
|
#!/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
|