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

Set modem path on z810* only if modems use ModemManager

This commit is contained in:
Ycarus (Yannick Chabanois) 2025-02-18 19:59:42 +01:00
parent 4904bf3f83
commit 25ed929191

View file

@ -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'