mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Remove qmi and modemmanager data in config
This commit is contained in:
parent
9910e61efc
commit
85bce00199
1 changed files with 13 additions and 12 deletions
|
@ -543,18 +543,19 @@ if [ "$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.lc)" = "" ] || [ $(($(
|
||||||
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.lc=$(date +"%s")
|
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.lc=$(date +"%s")
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
protocol="$(uci -q get network.$OMR_TRACKER_INTERFACE.proto)"
|
proto="$(uci -q get network.$OMR_TRACKER_INTERFACE.proto)"
|
||||||
if [ "$proto" = "qmi" ]; then
|
#if [ "$proto" = "qmi" ]; then
|
||||||
intfdata="$(omr-qmi $OMR_TRACKER_DEVICE all | tr -d '\n')"
|
# intfdata="$(omr-qmi $OMR_TRACKER_DEVICE all | tr -d '\n')"
|
||||||
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.operator=$(echo $intfdata | awk -F";" '{print $2}')
|
# uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.operator=$(echo $intfdata | awk -F";" '{print $2}')
|
||||||
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.number=$(echo $intfdata | awk -F";" '{print $3}')
|
# uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.number=$(echo $intfdata | awk -F";" '{print $3}')
|
||||||
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.state=$(echo $intfdata | awk -F";" '{print $4}')
|
# uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.state=$(echo $intfdata | awk -F";" '{print $4}')
|
||||||
elif [ "$proto" = "modemmanager" ]; then
|
#elif [ "$proto" = "modemmanager" ]; then
|
||||||
intfdata="$(omr-modemmanager $OMR_TRACKER_DEVICE all)"
|
# intfdata="$(omr-modemmanager $OMR_TRACKER_DEVICE all)"
|
||||||
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.operator=$(echo $intfdata | awk -F";" '{print $2}')
|
# uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.operator=$(echo $intfdata | awk -F";" '{print $2}')
|
||||||
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.number=$(echo $intfdata | awk -F";" '{print $3}')
|
# uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.number=$(echo $intfdata | awk -F";" '{print $3}')
|
||||||
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.state=$(echo $intfdata | awk -F";" '{print $4}')
|
# uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.state=$(echo $intfdata | awk -F";" '{print $4}')
|
||||||
else
|
#else
|
||||||
|
if [ "$proto" != "qmi" ] && [ "$proto" != "modemmanager" ]; then
|
||||||
if [ -n "$OMR_TRACKER_DEVICE_GATEWAY" ] && [ -n "$(curl -s -m 1 -X GET http://$OMR_TRACKER_DEVICE_GATEWAY/api/webserver/SesTokInfo)" ]; then
|
if [ -n "$OMR_TRACKER_DEVICE_GATEWAY" ] && [ -n "$(curl -s -m 1 -X GET http://$OMR_TRACKER_DEVICE_GATEWAY/api/webserver/SesTokInfo)" ]; then
|
||||||
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.manufacturer='huawei'
|
uci -q set openmptcprouter.$OMR_TRACKER_INTERFACE.manufacturer='huawei'
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue