1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Add BPI-R4 network config

This commit is contained in:
Ycarus (Yannick Chabanois) 2025-02-18 14:06:57 +01:00
parent ffe9f68064
commit 4904bf3f83

View file

@ -106,6 +106,8 @@ fi
lanif="eth0"
if [ "$(cat /etc/board.json | jsonfilter -q -e '@.model.id' | tr -d '\n')" = "friendlyarm,nanopi-r5c" ]; then
lanif="eth0"
elif [ "$(cat /etc/board.json | jsonfilter -q -e '@.model.id' | tr -d '\n')" = "bananapi,bpi-r4" ] || [ "$(cat /etc/board.json | jsonfilter -q -e '@.model.id' | tr -d '\n')" = "bananapi,bpi-r4-poe" ]; then
lanif="wan"
elif [ "$(grep rockchip /etc/os-release)" != "" ]; then
lanif="eth1"
elif [ "$(grep filogic /etc/os-release)" != "" ]; then
@ -259,6 +261,10 @@ if [ "$(uci -q show network.wan1 | grep multipath)" = "" ] && [ -z "$(uci -q get
_setup_wan_interface wan2 eth1.2 on
_setup_wan_interface wan3 eth1.3 on
_setup_wan_interface wan4 eth1.4 on
elif [ "$(cat /etc/board.json | jsonfilter -q -e '@.model.id' | tr -d '\n')" = "bananapi,bpi-r4" ] || [ "$(cat /etc/board.json | jsonfilter -q -e '@.model.id' | tr -d '\n')" = "bananapi,bpi-r4-poe" ]; then
_setup_wan_interface wan1 lan1 master
_setup_wan_interface wan2 lan2 on
_setup_wan_interface wan3 lan3 on
elif [ "$(cat /etc/board.json | jsonfilter -q -e '@.model.id' | tr -d '\n')" = "friendlyarm,nanopi-r5c" ]; then
_setup_wan_interface wan1 eth1 master macvlan
_setup_wan_interface wan2 eth1 on macvlan
@ -402,8 +408,8 @@ if [ "$(uci -q show network.wan1 | grep multipath)" = "" ] && [ -z "$(uci -q get
_setup_wan_interface wan2 lan3 on
_setup_wan_interface wan3 lan4 on
if [ -d /sys/class/net/10g-1 ] && [ -d /sys/class/net/10g-2 ]; then
_setup_wan_interface wan3 10g-1 on
_setup_wan_interface wan3 10g-2 on
_setup_wan_interface wan4 10g-1 on
_setup_wan_interface wan5 10g-2 on
fi
else
_setup_wan_interface wan1 eth0 master macvlan