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

Fix huawei operator name

This commit is contained in:
Ycarus (Yannick Chabanois) 2020-05-11 10:01:00 +02:00
parent 5352c9baa0
commit 840628a78e

View file

@ -39,7 +39,8 @@ OPERATOR=""
if [ "$CONNECTSTATE" = "901" ]; then if [ "$CONNECTSTATE" = "901" ]; then
tmpfile=$(mktemp) tmpfile=$(mktemp)
curl -s -m 1 -X GET "http://$MODEM_IP/api/net/current-plmn" -H "Cookie: SessionID=$COOKIE" -H "__RequestVerificationToken: $TOKEN" -H "Content-Type: text/xml" > ${tmpfile} curl -s -m 1 -X GET "http://$MODEM_IP/api/net/current-plmn" -H "Cookie: SessionID=$COOKIE" -H "__RequestVerificationToken: $TOKEN" -H "Content-Type: text/xml" > ${tmpfile}
OPERATOR=$(cat ${tmpfile} | grep FullName | sed -e 's/<[^>]*>//g') OPERATOR=$(grep FullName ${tmpfile} | cut -f2 -d'>' | cut -f1 -d'<')
#$(cat ${tmpfile} | grep FullName | sed -e 's/<[^>]*>//g' | sed 's/[^\x00-\x7F]//g' | tr -d "\n")
rm -f ${tmpfile} rm -f ${tmpfile}
fi fi
NUMBER="" NUMBER=""