get ipv6 prefix from easy box
This commit is contained in:
@@ -69,6 +69,17 @@ if [[ "$1" == "wan" && "$2" == "ip" ]]; then
|
||||
RETVAL=$(echo "$OUT" | xmllint --xpath "//Value/text()" -)
|
||||
fi
|
||||
|
||||
if [[ "$1" == "wan" && "$2" == "ipv6prefix" ]]; then
|
||||
echo "request: http://${HOST}/data_model.cgi" 1>&2
|
||||
POST_DATA="<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\"><soapenv:Header><DMCookie>${DM_COOKIE}</DMCookie><SessionNotRefresh>1</SessionNotRefresh></soapenv:Header><soapenv:Body><cwmp:GetParameterValues xmlns=\"\"><ParameterNames><string>InternetGatewayDevice.X_JUNGO_COM_TR_181.Device.IP.Interface.33948673.IPv6Prefix.2049.Prefix</string></ParameterNames></cwmp:GetParameterValues></soapenv:Body></soapenv:Envelope>"
|
||||
|
||||
OUT=$($WGET \
|
||||
--post-data="${POST_DATA}" \
|
||||
"http://${HOST}/data_model.cgi")
|
||||
|
||||
RETVAL=$(echo "$OUT" | xmllint --xpath "//Value/text()" -)
|
||||
fi
|
||||
|
||||
echo "$RETVAL"
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user