From c3ba98f2f3edecc596e1db28958fbd1d60a43fef Mon Sep 17 00:00:00 2001 From: vdutta Date: Mon, 18 Jul 2022 19:16:00 +0530 Subject: [PATCH] icwmp: 8.4.25.1 --- icwmp/Makefile | 2 +- icwmp/files/etc/init.d/icwmpd | 12 ++++++++++-- icwmp/files/lib/upgrade/keep.d/icwmp | 1 + 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/icwmp/Makefile b/icwmp/Makefile index 98f46db15..5935854b7 100755 --- a/icwmp/Makefile +++ b/icwmp/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=icwmp -PKG_VERSION:=8.4.25 +PKG_VERSION:=8.4.25.1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/icwmp.git diff --git a/icwmp/files/etc/init.d/icwmpd b/icwmp/files/etc/init.d/icwmpd index 6607a84d8..a4dc10d13 100755 --- a/icwmp/files/etc/init.d/icwmpd +++ b/icwmp/files/etc/init.d/icwmpd @@ -173,10 +173,13 @@ validate_defaults() { return 1; } + ssl_capath="${ssl_capath%/}" # Put the cert pem file in keep list if [ -d "${ssl_capath}" ]; then - if ! grep "${ssl_capath}" /lib/upgrade/keep.d/icwmp; then + if ! grep "*.pem\|*.crt" /lib/upgrade/keep.d/icwmp; then echo "${ssl_capath}"'/*.pem' >> /lib/upgrade/keep.d/icwmp + echo "${ssl_capath}"'/*.crt' >> /lib/upgrade/keep.d/icwmp + echo "${ssl_capath}"'/*.0' >> /lib/upgrade/keep.d/icwmp fi fi @@ -248,20 +251,25 @@ service_stopped() } reload_service() { + local ret + config_load cwmp config_get_bool enable_cwmp cpe enable 1 + ret="0" if [ "$enable_cwmp" = "0" ]; then stop return 0 fi status="$(ubus -t 1 call tr069 status |jsonfilter -qe '@.cwmp.status')" + ret="$?" if [ "$status" = "up" ]; then ubus -t 1 call tr069 command '{"command":"reload"}' + ret="$?" fi - if [ "$status" = "init" ] || [ "$?" -ne "0" ]; then + if [ "$status" = "init" ] || [ "$ret" -ne "0" ]; then log "Restarting CWMP client" stop start diff --git a/icwmp/files/lib/upgrade/keep.d/icwmp b/icwmp/files/lib/upgrade/keep.d/icwmp index 88faf92ed..788b0a136 100644 --- a/icwmp/files/lib/upgrade/keep.d/icwmp +++ b/icwmp/files/lib/upgrade/keep.d/icwmp @@ -1 +1,2 @@ /var/run/icwmpd/icwmpd_backup_session.xml +/etc/icwmpd/cwmp