#!/bin/shecho"network configuration..."# 启动AP网卡和USB网卡ifconfig wlan0 up
ifconfig eth1 up
# 更改br0-lan网卡的地址
uci set network.lan.ipaddr=10.10.10.1
# 配置AP
uci set wireless.@wifi-device[0].disabled=0
uci set wireless.@wifi-device[0].txpower=17
uci set wireless.@wifi-device[0].channel=6
uci set wireless.@wifi-iface[0].mode=ap
uci set wireless.@wifi-iface[0].ssid=OpenWrt_1234
uci set wireless.@wifi-iface[0].network=lan
uci set wireless.@wifi-iface[0].encryption=psk2
uci set wireless.@wifi-iface[0].key=99887766# 配置USB网卡,设置防火墙
uci set network.usb_wan=interface
uci set network.usb_wan.proto=dhcp
uci set network.usb_wan.device=eth1
uci set firewall.@zone[1].network="$(uci get firewall.@zone[1].network) usb_wan"# 保存配置并生效
uci commit
/etc/init.d/network restart