diff --git a/luci-app-openmptcprouter/root/bin/omr-huawei b/luci-app-openmptcprouter/root/bin/omr-huawei index b334230f5..566ae4e61 100755 --- a/luci-app-openmptcprouter/root/bin/omr-huawei +++ b/luci-app-openmptcprouter/root/bin/omr-huawei @@ -39,7 +39,8 @@ OPERATOR="" if [ "$CONNECTSTATE" = "901" ]; then 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} - 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} fi NUMBER=""