hansome
9
These two function is to setup router or ap mode, you can add them to /usr/bin/switchaction in proper place and have a try.
mode_ap(){
uci set dhcp.lan.ignore=1
uci set glconfig.bridge=service
uci set glconfig.bridge.mode=ap
uci set network.lan.proto='dhcp'
uci set network.wan.ifname=''
uci set network.lan.ifname='eth0.0 eth0.1'
uci commit
}
mode_router(){
uci set dhcp.lan.ignore=0
uci delete glconfig.bridge
uci set network.lan.proto='static'
uci set network.wan.ifname='eth0.1'
uci set network.lan.ifname='eth0.0'
uci commit
}