新增pon口路由初始化脚本,使其在下级路由也能正常访问猫棒,默认猫棒ip固定为192.168.0.10,脚本可以酌情修改

This commit is contained in:
kos 2023-06-14 09:48:05 +08:00
parent 5e3fc8b566
commit e1ce21f5a8
1 changed files with 25 additions and 0 deletions

View File

@ -0,0 +1,25 @@
#!/bin/sh
board=$(cat /tmp/sysinfo/board_name)
case "$board" in
scensmart,sv901)
uci -q set network.lan.ipaddr="192.168.9.1"
uci -q set network.pon=interface
uci -q set network.pon.proto="static"
uci -q set network.pon.ifname="eth0.2"
uci -q set network.pon.delegate="0"
uci -q set network.pon.ipaddr="192.168.1.254"
uci -q set network.pon.netmask="255.255.255.0"
uci -q set network.pon.metric="100"
uci -q set network.pon_route=route
uci -q set network.pon_route.interface='pon'
uci -q set network.pon_route.target='192.168.1.10'
uci -q set network.pon_route.netmask='255.255.255.0'
uci -q set network.pon_route.gateway='192.168.1.254'
uci -q set network.pon_route.metric='100'
uci -q commit network
;;
*)
exit 0
;;
esac
exit 0