2023-11-09 19:03:28 +08:00

27 lines
551 B
Bash
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/bin/sh
en=1 #调试开关0关闭1打开 2输出到文件
outfile="/tmp/cpe.log" #输出文件
#日志信息
Debug()
{
tim=$(date "+%Y-%m-%d %H:%M:%S") #获取系统时间
if [ $en == 1 ]; then
echo $tim $1 #打印输出
elif [ $en == 2 ]; then
echo $tim $1 >> $outfile #输出到文件
fi
}
ATPORT()
{
MODEMNAME="ALL"
# ATPORT=$(uci -q get modem.@ndis[0].tyyusb)
lsusb=$( lsusb )
RDFM650=$(echo "$lsusb" | grep "ID 2cb7:0a05 " | wc -l)
if [ "$RDFM650" == 1 ]; then
ATPORT=0
MODEMNAME="FM650CN"
else
ATPORT=2
fi
}