ucidef_set_interface_lan() { local ifname=$1 uci batch <<EOF set network.lan='interface' set network.lan.ifname='$ifname' set network.lan.type='bridge' #更改lan口獲取ip的方式爲static set network.lan.proto='static' #更改lan口ip爲10.1 set network.lan.ipaddr='192.168.8.1' set network.lan.netmask='255.255.255.0' set network.lan.ip6addr='fd04:bd3:80e8:1::1/64' EOF }
[ -n "$vlan" ] && ifname=${ifname}.${vlan} uci -q batch <<EOF delete network.$1 set network.$1='interface' set network.$1.ifname='$ifname' set network.$1.force_link=1 set network.$1.proto='none' set network.$1.macaddr='$macaddr' EOF case $1 in lan) uci -q batch <<EOF set network.$1.type='bridge' set network.$1.proto='static' set network.$1.ipaddr='192.168.8.1' set network.$1.netmask='255.255.255.0' set network.$1.ip6assign='60' EOF
root:$1$w5bS7kS8$EdCLg/tPX6T8wv4VXWNtn.:0:0:99999:7:::
config wifi-device radio$devidx option type mac80211 option channel ${channel} option hwmode 11${mode_11n}${mode_band}$dev_id$ht_capab # REMOVE THIS LINE TO ENABLE WIFI: option disabled 1 #刪掉上面那一行或者將值從1改成0,則能夠開啓wifi config wifi-iface option device radio$devidx option network lan option mode ap #option ssid OpenWrt option ssid mywifi #更改成你想要的ssid option encryption none
# add option zonename Asia/Shanghai by benlau # modify option timezone from UTC to CST-8 by benlau option hostname myhost option timezone CST-8 option zonename Asia/Shanghai