mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-02-15 03:51:51 +00:00
sync (#594)
This commit is contained in:
commit
17a4258174
4 changed files with 22 additions and 38 deletions
|
@ -9,9 +9,9 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=glorytun
|
||||
PKG_RELEASE:=7
|
||||
PKG_RELEASE:=8
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=0c3b03cf0215e0896fd8e7e91be92efa77f6a2d1
|
||||
PKG_SOURCE_VERSION:=8aebb3efb3b108b1276aa74679e200e003f298de
|
||||
PKG_SOURCE:=glorytun-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/Ysurac/glorytun.git
|
||||
PKG_VERSION:=0.0.35
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# Copyright (C) 2018-2024 Ycarus (Yannick Chabanois) <ycarus@zugaina.org> for OpenMPTCProuter
|
||||
# Copyright (C) 2018-2025 Ycarus (Yannick Chabanois) <ycarus@zugaina.org> for OpenMPTCProuter
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
# This script check if MPTCP status is correct on interface
|
||||
# This script check if MPTCP status is correct on interface and if modems are correctly set on z8102ax
|
||||
|
||||
# Set default multipath status
|
||||
[ "$OMR_TRACKER_INTERFACE" = "omrvpn" ] && multipath "$OMR_TRACKER_DEVICE" off >/dev/null 2>&1
|
||||
|
@ -27,3 +27,18 @@ if [ -n "$OMR_TRACKER_INTERFACE" ] && [ -n "$OMR_TRACKER_DEVICE" ] && [ "$OMR_TR
|
|||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$(grep z8102ax /etc/board.json)" ]; 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'
|
||||
set network.modem2.device='/sys/devices/platform/soc/11200000.usb/usb1/1-1/1-1.2'
|
||||
EOF
|
||||
elif [ -e /sys/devices/platform/soc/11200000.usb/usb2/2-1/2-1.1 ]; then
|
||||
uci -q batch <<-EOF
|
||||
set network.modem1.device='/sys/devices/platform/soc/11200000.usb/usb2/2-1/2-1.1'
|
||||
set network.modem2.device='/sys/devices/platform/soc/11200000.usb/usb2/2-1/2-1.2'
|
||||
EOF
|
||||
fi
|
||||
[ -n "$(uci -q changes network)" ] && uci -q commit network
|
||||
fi
|
|
@ -494,13 +494,10 @@ if [ "$board" = "z8102ax-128m" ] || [ "$board" = "z8102ax-64m" ] || [ "$board" =
|
|||
set network.modem2.delegate='0'
|
||||
set network.modem2.multipath='on'
|
||||
set network.modem2.defaultroute='0'
|
||||
set network.modem1.device='/sys/devices/platform/soc/11200000.usb/usb1/1-1/1-1.1'
|
||||
set network.modem2.device='/sys/devices/platform/soc/11200000.usb/usb1/1-1/1-1.2'
|
||||
EOF
|
||||
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'
|
||||
set network.modem2.device='/sys/devices/platform/soc/11200000.usb/usb1/1-1/1-1.2'
|
||||
EOF
|
||||
elif [ -e /sys/devices/platform/soc/11200000.usb/usb2/2-1/2-1.1 ]; then
|
||||
if [ -e /sys/devices/platform/soc/11200000.usb/usb2/2-1/2-1.1 ]; then
|
||||
uci -q batch <<-EOF
|
||||
set network.modem1.device='/sys/devices/platform/soc/11200000.usb/usb2/2-1/2-1.1'
|
||||
set network.modem2.device='/sys/devices/platform/soc/11200000.usb/usb2/2-1/2-1.2'
|
||||
|
|
|
@ -48,20 +48,6 @@ modem1()
|
|||
else
|
||||
gpioset -t0 modem1=1
|
||||
fi
|
||||
if [ -n "$(uci -q get network.modem1)" ] && [ -z "$(uci -q get network.modem1.device)" ]; then
|
||||
sleep 20
|
||||
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'
|
||||
commit network
|
||||
EOF
|
||||
elif [ -e /sys/devices/platform/soc/11200000.usb/usb2/2-1/2-1.1 ]; then
|
||||
uci -q batch <<-EOF
|
||||
set network.modem1.device='/sys/devices/platform/soc/11200000.usb/usb2/2-1/2-1.1'
|
||||
commit network
|
||||
EOF
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
modem2()
|
||||
|
@ -103,20 +89,6 @@ modem2()
|
|||
else
|
||||
gpioset -t0 modem2=1
|
||||
fi
|
||||
if [ -n "$(uci -q get network.modem2)" ] && [ -z "$(uci -q get network.modem2.device)" ]; then
|
||||
sleep 20
|
||||
if [ -e /sys/devices/platform/soc/11200000.usb/usb1/1-1/1-1.2 ]; then
|
||||
uci -q batch <<-EOF
|
||||
set network.modem2.device='/sys/devices/platform/soc/11200000.usb/usb1/1-1/1-1.2'
|
||||
commit network
|
||||
EOF
|
||||
elif [ -e /sys/devices/platform/soc/11200000.usb/usb2/2-1/2-1.2 ]; then
|
||||
uci -q batch <<-EOF
|
||||
set network.modem2.device='/sys/devices/platform/soc/11200000.usb/usb2/2-1/2-1.2'
|
||||
commit network
|
||||
EOF
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
start_service()
|
||||
|
|
Loading…
Reference in a new issue