Chinaunix首页 | 论坛 | 博客
  • 博客访问: 147271
  • 博文数量: 49
  • 博客积分: 2510
  • 博客等级: 少校
  • 技术积分: 595
  • 用 户 组: 普通用户
  • 注册时间: 2008-11-25 23:08
文章分类
文章存档

2011年(1)

2009年(48)

我的朋友

分类:

2009-06-19 23:14:19


 

################ adhoc ####################
ifconfig br0 down
brctl delbr br0

brctl addbr br0
hostapd -B -dd /etc/hostapd.conf
brctl addif br0 wlan0
ifconfig br0 192.168.10.115

 

 

#rm /etc/hostapd.conf
#rm /etc/wpa_supplicant.conf

if [ "$aporsta" == "0" ]; then
    ifconfig br0 down > /dev/null 2>&1
    brctl delbr br0 > /dev/null 2>&1
    /sbin/set_hostapd_config.sh
    cp /wwww/hostapd.conf /etc/
    brctl addbr br0
    hostapd -B -dd /etc/hostapd.conf
    brctl addif br0 wlan0
    ifconfig br0 ${athip}
else if [ "$aporsta" == "1" ]; then
    /sbin/set_wpa_supplicant.sh
    cp /www/wpa_supplicant.conf /etc/
        wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf  -B -dd
    ifconfig wlan0 ${athip}

else if [ "$aporsta" == "2" ]; then
    ifconfig mesh down > /dev/null 2>&1
    iw dev mesh del > /dev/null 2>&1

    iw dev wlan0 interface add mesh type mp mesh_id ${generl_ssid}
    ifconfig mesh ${athip} up
    iw dev mesh set channel ${generl_channel}
    iw dev mesh scan  # > /dev/null 2>&1
else if [ "$aporsta" == "3" ]; then
    ifconfig adhoc down > /dev/null 2>&1
    ifconfig adhoc down > /dev/null 2>&1
    iw dev wlan0 interface add adhoc type ibss
    iwconfig adhoc essid ${generl_ssid}
    ifconfig adhoc ${athip} up
    iwconfig adhoc channel ${generl_channel}
    iw dev adhoc scan
fi #end adhoc configure
fi #end mesh configure
fi #end station configure
fi #end ap configure

 


阅读(1089) | 评论(0) | 转发(0) |
0

上一篇:脚本学习记录1

下一篇:脚本学习记录2

给主人留下些什么吧!~~