diff --git a/easyBoxCtrl.sh b/easyBoxCtrl.sh index 88cf215..1f5490a 100755 --- a/easyBoxCtrl.sh +++ b/easyBoxCtrl.sh @@ -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="${DM_COOKIE}1InternetGatewayDevice.X_JUNGO_COM_TR_181.Device.IP.Interface.33948673.IPv6Prefix.2049.Prefix" + + OUT=$($WGET \ + --post-data="${POST_DATA}" \ + "http://${HOST}/data_model.cgi") + + RETVAL=$(echo "$OUT" | xmllint --xpath "//Value/text()" -) +fi + echo "$RETVAL" exit 0