mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Set 5G modems for z8102ax via OMR-Tracker post-tracking initilize script
This commit is contained in:
parent
f8e47a9fc5
commit
4314c7a487
3 changed files with 20 additions and 36 deletions
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue