Files

49 lines
728 B
Bash
Executable File

#!/bin/sh
#
# (c) 2025 Cezary Jackiewicz <cezary@eko.one.pl>
#
# (c) 2025-2026 modified by Rafał Wabik - IceG - From eko.one.pl forum
#
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
ECM=""
RES="/usr/share/modemdata"
device=$1
network=$2
forced_plmn=$3
SEPARATOR=""
parse_section() {
if echo "x$device" | grep -q "192.168."; then
ECM="$RES/addon/ecm/huawei.sh $device"
else
ECM=""
fi
echo "["
if [ -n "$ECM" ]; then
$ECM product
echo ","
$RES/network.sh "$network"
echo ","
$ECM params
else
$RES/product.sh "$device"
echo ","
$RES/network.sh "$network"
echo ","
$RES/params.sh "$device" "$forced_plmn"
fi
echo "]"
}
config_load modemdata
parse_section modemdata
exit 0