1、更改:/package/base-files/files/lib/functions/uci-default.sh
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
}
2、 15.05版本可能还需要更改:/package/base-files/files/bin/config_generate
[ -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