Commit be36f2e3 authored by Omar Kallel's avatar Omar Kallel
Browse files

icwmp: uci enhancements

parent 00dc43eb
......@@ -5,11 +5,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libbbfdm
PKG_VERSION:=6.0.0
PKG_VERSION:=6.0.2
PKG_FIXUP:=autoreconf
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/bbf.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=4226c94946ab6e37fcf4809901d217428e4c1e45
PKG_SOURCE_VERSION:=f14a3cd9e89c74b59581097ead02fec4a997b0b9
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
......
......@@ -8,11 +8,11 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=8.1.10-2021-09-25
PKG_VERSION:=8.2.0-2021-10-05
PKG_FIXUP:=autoreconf
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=2e55c12d13af617f9c5b1551e9d67287efd52715
PKG_SOURCE_VERSION:=ab875277578d851a9f8eed57883ca05c886b127d
PKG_RELEASE=$(PKG_SOURCE_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=skip
......
......@@ -4,10 +4,10 @@ if [ ! -f "/var/state/cwmp" ]; then
exit 0;
fi
zone_name=$(uci -P /var/state -q get cwmp.acs.zonename)
port=$(uci -P /var/state -q get cwmp.acs.port)
ipaddr=$(uci -P /var/state -q get cwmp.acs.ip)
ipv6enable=$(uci -P /var/state -q get cwmp.acs.ipv6enable)
zone_name=$(uci -c /var/state -q get cwmp.acs.zonename)
port=$(uci -c /var/state -q get cwmp.acs.port)
ipaddr=$(uci -c /var/state -q get cwmp.acs.ip)
ipv6enable=$(uci -c /var/state -q get cwmp.acs.ipv6_enable)
incoming_rule=$(uci -q get cwmp.cpe.incoming_rule|tr [A-Z] [a-z])
if [ "$zone_name" = "" ]; then
......
......@@ -67,7 +67,7 @@ handle_icwmp_restart() {
local curopt43url=""
local opt43urlfile=/tmp/ipv4/$INTERFACE-opt43url
prevopt43url=$(cat $opt43urlfile 2>/dev/null)
curopt43url="$(uci -P /var/state -q get cwmp.acs.dhcp_url)"
curopt43url="$(uci -c /var/state -q get cwmp.acs.dhcp_url)"
[ -n "$curopt43url" ] && echo $curopt43url > $opt43urlfile || rm -f $opt43urlfile
[ \
......
......@@ -35,19 +35,19 @@ get_acs_url() {
local default_acs="http://10.10.1.6:8000/openacs/acs"
local acs_dhcp_discovery="$(uci -q get cwmp.acs.dhcp_discovery)"
local url="$(uci -q get cwmp.acs.url)"
local dhcp_url="$(uci -P /var/state -q get cwmp.acs.dhcp_url)"
local dhcp_url="$(uci -c /var/state -q get cwmp.acs.dhcp_url)"
if [ "$acs_dhcp_discovery" == "enable" -a -n "$dhcp_url" -o -z "$url" ]; then
url="$dhcp_url"
log "ACS URL from DHCP server: $url"
[ -n "$url" ] && uci -P /var/state -q set cwmp.acs.url="$url" || url="$default_acs"
[ -n "$url" ] && uci -c /var/state -q set cwmp.acs.url="$url" || url="$default_acs"
elif [ -n "$url" ];then
url="$(uci -q get cwmp.acs.url)"
log "ACS URL from configuration: $url"
else
url="$default_acs"
log "Using default ACS URL: $url"
[ -n "$url" ] && uci -P /var/state -q set cwmp.acs.url="$url"
[ -n "$url" ] && uci -c /var/state -q set cwmp.acs.url="$url"
fi
validate_url "$url"
......@@ -115,7 +115,7 @@ wait_for_option43() {
log "Waiting for discovery of ACS URL from dhcp server ..."
while [ $tm -le $time ]
do
acs_url=`uci -P /var/state -q get cwmp.acs.dhcp_url`
acs_url=`uci -c /var/state -q get cwmp.acs.dhcp_url`
if [ "$acs_url" != "" ]
then
break
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment