diff --git a/omr-tracker/files/usr/share/omr/post-tracking.d/001-initialize b/omr-tracker/files/usr/share/omr/post-tracking.d/001-initialize index 6ce92dd52..c9ae16e11 100755 --- a/omr-tracker/files/usr/share/omr/post-tracking.d/001-initialize +++ b/omr-tracker/files/usr/share/omr/post-tracking.d/001-initialize @@ -28,7 +28,7 @@ if [ -n "$OMR_TRACKER_INTERFACE" ] && [ -n "$OMR_TRACKER_DEVICE" ] && [ "$OMR_TR fi fi -if [ -n "$(grep z8102ax /etc/board.json)" ]; then +if [ -n "$(grep z8102ax /etc/board.json)" ] && [ "$(uci -q get network.modem1.proto)" = "modemmanager" ]; then if [ -e /sys/devices/platform/soc/11200000.usb/usb1/1-1/1-1.1 ]; then uci -q batch <<-EOF set network.modem1.device='/sys/devices/platform/soc/11200000.usb/usb1/1-1/1-1.1' @@ -42,7 +42,7 @@ if [ -n "$(grep z8102ax /etc/board.json)" ]; then fi [ -n "$(uci -q changes network)" ] && uci -q commit network fi -if [ -n "$(grep z8109ax /etc/board.json)" ]; then +if [ -n "$(grep z8109ax /etc/board.json)" ] && [ "$(uci -q get network.modem1.proto)" = "modemmanager" ]; then if [ -e /sys/devices/platform/soc/11200000.usb/usb1/1-1/1-1.1 ]; then uci -q batch <<-EOF set network.modem1.device='/sys/devices/platform/soc/11200000.usb/usb1/1-1/1-1.1' diff --git a/openmptcprouter/files/etc/uci-defaults/1920-omr-network b/openmptcprouter/files/etc/uci-defaults/1920-omr-network index 19cfe313e..6572e6158 100755 --- a/openmptcprouter/files/etc/uci-defaults/1920-omr-network +++ b/openmptcprouter/files/etc/uci-defaults/1920-omr-network @@ -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 @@ -340,6 +346,10 @@ if [ "$(uci -q show network.wan1 | grep multipath)" = "" ] && [ -z "$(uci -q get _setup_wan_interface wan4 lan4 on _macaddr=$(uci -q get "network.lan4.macaddr") _setup_macaddr "wan4" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" + if [ -d /sys/class/net/lan5 -o -n "$(ip link | grep ' lan5')" ]; then + _macaddr=$(uci -q get "network.lan5.macaddr") + _setup_macaddr "wan5" "${_macaddr:-$(dd if=/dev/urandom bs=1024 count=1 2>/dev/null | md5sum | sed -e 's/^\(..\)\(..\)\(..\)\(..\)\(..\)\(..\).*$/\1:\2:\3:\4:\5:\6/' -e 's/^\(.\)[13579bdf]/\10/')}" + fi elif [ -d /sys/class/net/wan1 ] || [ -n "$(ip link | grep ' wan1')" ]; then if [ -d /sys/class/net/wan2 ] || [ -n "$(ip link | grep ' wan2')" ]; then _setup_wan_interface wan1 wan1 master @@ -402,8 +412,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 diff --git a/v2ray-core/files/etc/firewall.v2ray-rules b/v2ray-core/files/etc/firewall.v2ray-rules index a76fa56c0..c31714bae 100644 --- a/v2ray-core/files/etc/firewall.v2ray-rules +++ b/v2ray-core/files/etc/firewall.v2ray-rules @@ -1,2 +1,3 @@ #!/bin/sh [ "$(uci -q get v2ray.main_dns.enabled)" = "1" ] && /etc/init.d/v2ray rules_up +exit 0 \ No newline at end of file diff --git a/xray-core/files/etc/firewall.xray-rules b/xray-core/files/etc/firewall.xray-rules index 2a82fba79..2d12daae6 100644 --- a/xray-core/files/etc/firewall.xray-rules +++ b/xray-core/files/etc/firewall.xray-rules @@ -1,2 +1,3 @@ #!/bin/sh [ "$(uci -q get xray.main_dns.enabled)" = "1" ] && /etc/init.d/xray rules_up +exit 0 \ No newline at end of file