cwmp: Use cpe specific acs password

This commit is contained in:
Vivek Kumar Dutta 2025-04-15 18:10:35 +05:30
parent bce378a665
commit 6cf5641ea7
No known key found for this signature in database
GPG key ID: 4E09F5AD8265FD4C
3 changed files with 17 additions and 3 deletions

View file

@ -8,7 +8,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=9.9.2
PKG_VERSION:=9.9.3
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)

View file

@ -1,6 +1,6 @@
config acs 'acs'
option userid '' #$OUI-$SER
option passwd 'iopsys'
option passwd ''
option periodic_inform_enable 'true'
option periodic_inform_interval '1800'
option periodic_inform_time '0001-01-01T00:00:00Z'
@ -29,7 +29,7 @@ config cpe 'cpe'
option log_file_name '/var/log/icwmpd.log'
option log_max_size '102400'
option userid '' #$OUI-$SER
option passwd 'iopsys'
option passwd ''
option port '7547'
option provisioning_code ''
option amd_version '5'

View file

@ -4,6 +4,10 @@
# Copy defaults by the factory to the cwmp UCI user section.
config_load cwmp
if [ -f "/lib/functions/iopsys-environment.sh" ]; then
. /lib/functions/iopsys-environment.sh
fi
# Get Manufacturer OUI.
config_get oui cpe manufacturer_oui ""
if [ -z "${oui}" ]; then
@ -38,4 +42,14 @@ if [ -z "${enable_cwmp}" ]; then
uci -q set cwmp.cpe.enable="1"
fi
default_password="$(get_acs_password)"
config_get pass cpe passwd ""
if [ -z "${pass}" ]; then
uci -q set cwmp.cpe.passwd="${default_password}"
fi
config_get pass acs passwd ""
if [ -z "${pass}" ]; then
uci -q set cwmp.acs.passwd="${default_password}"
fi
# No need for commit here, it is done by uci_apply_defaults().