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

Force eth0 on LAN for banana-pi R3

This commit is contained in:
Ycarus (Yannick Chabanois) 2024-11-22 09:46:39 +01:00
parent a26255203e
commit 591b89c551

View file

@ -107,6 +107,8 @@ if [ "$(grep rockchip /etc/os-release)" != "" ]; then
lanif="eth1"
elif [ "$(grep filogic /etc/os-release)" != "" ]; then
lanif="eth1"
elif [ "$(cat /etc/board.json | jsonfilter -q -e '@.model.id' | tr -d '\n')" = "bananapi_bpi-r3" ]; then
lanif="eth0"
elif [ -d /sys/class/net/lan0 -o -n "$(ip link | grep ' lan0')" ] && [ -d /sys/class/net/wan -o -n "$(ip link | grep ' wan@')" -o -n "$(ip link | grep ' wan:')" ]; then
lanif="wan"
elif [ -d /sys/class/net/lan1 -o -n "$(ip link | grep ' lan1')" ] && [ -d /sys/class/net/wan -o -n "$(ip link | grep ' wan@')" -o -n "$(ip link | grep ' wan:')" ]; then