mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
cwmp: Use cpe specific acs password
This commit is contained in:
parent
bce378a665
commit
6cf5641ea7
3 changed files with 17 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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().
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue