mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
icwmp: Fix interface update handler
This change includes multiple fixes: - Fix inform sent on interface.update with non-configured wan interface - Fix Device.WiFi.NeighboringWiFiDiagnostic. for cwmp
This commit is contained in:
parent
6e3490b985
commit
723c52bcf5
3 changed files with 16 additions and 17 deletions
|
|
@ -8,11 +8,11 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=icwmp
|
||||
PKG_VERSION:=9.3.5
|
||||
PKG_VERSION:=9.3.6
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/icwmp.git
|
||||
PKG_SOURCE_VERSION:=caa4ac86b91b698e73e09a3ba8b60add36ea4b62
|
||||
PKG_SOURCE_VERSION:=1282569ce4a37ae90cbab6485aebaa9886501a0b
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,8 @@ handle_icwmp_update() {
|
|||
return 0
|
||||
fi
|
||||
|
||||
# wait for some time to avoid interface fluctuation
|
||||
sleep 10
|
||||
ret=$(ubus call service list '{"name":"icwmpd"}' | jsonfilter -qe '@.icwmpd.instances.icwmp.running')
|
||||
|
||||
if [ "$ret" = "true" ]; then
|
||||
|
|
|
|||
|
|
@ -488,20 +488,17 @@ reload_service() {
|
|||
fi
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger "cwmp"
|
||||
|
||||
procd_open_trigger
|
||||
json_add_array
|
||||
json_add_string "" "interface.update"
|
||||
json_add_array
|
||||
json_add_array
|
||||
json_add_string "" "run_script"
|
||||
json_add_string "" "/etc/icwmpd/update.sh"
|
||||
json_close_array
|
||||
json_close_array
|
||||
json_add_int "" "2000"
|
||||
json_close_array
|
||||
procd_close_trigger
|
||||
add_interface_trigger() {
|
||||
procd_add_interface_trigger "interface.update" "$1" /etc/icwmpd/update.sh
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
local wan_interface
|
||||
|
||||
config_load cwmp
|
||||
config_get wan_interface cpe default_wan_interface "wan"
|
||||
|
||||
procd_add_reload_trigger "cwmp"
|
||||
add_interface_trigger ${default_wan_interface}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue