Tuesday, June 7, 2011

连接Android热点

[cc lang='bash' ]
#!/bin/sh
modprobe r8192se_pci
DHCPC_PID=/var/run/dhcpcd-wlan0.pid
#/etc/init.d/hal stop
#/etc/init.d/dbus stop
if [ -f $DHCPC_PID ];then
killall -9 dhcpcd-bin
rm -f $DHCPC_PID
fi
ifconfig wlan0 up
/sbin/wpa_supplicant -B -Dwext -iwlan0 -c/home/redhat/tools/conf/wpa1.conf
dhcpcd -R -Y -N wlan0
route add default gw 192.168.43.1 > /dev/null 2>&1
[/cc]

No comments:

Post a Comment