mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-27 12:33:49 +08:00
Compare commits
186 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e3b1ebf363 | ||
|
|
b699f89d41 | ||
|
|
6b26936300 | ||
|
|
386412064c | ||
|
|
84ac60736f | ||
|
|
2d037f5e73 | ||
|
|
3cebe495c5 | ||
|
|
1e2dd935f5 | ||
|
|
425bf39763 | ||
|
|
367a9b7ef3 | ||
|
|
125b7d6f57 | ||
|
|
7d08926622 | ||
|
|
396e0c6ca8 | ||
|
|
ab794f7469 | ||
|
|
e0cda7f5d0 | ||
|
|
ce6a87ffe7 | ||
|
|
9a83b05eac | ||
|
|
bfb9c65610 | ||
|
|
acea025b63 | ||
|
|
01b5c29100 | ||
|
|
8c6c12fe53 | ||
|
|
f9b36e5b0b | ||
|
|
a95afbb928 | ||
|
|
f4cf83b813 | ||
|
|
94f7110729 | ||
|
|
72de1d65c0 | ||
|
|
6a45c379c2 | ||
|
|
a2522dfff0 | ||
|
|
4312fa6a16 | ||
|
|
62dd45321e | ||
|
|
258744a16e | ||
|
|
b574d39642 | ||
|
|
deaa91514b | ||
|
|
801dee5cfa | ||
|
|
bf26939fb4 | ||
|
|
1c7945e834 | ||
|
|
d52f95fc35 | ||
|
|
9325f1a724 | ||
|
|
dfcc8ff111 | ||
|
|
8366ad85e7 | ||
|
|
c56cb30b3b | ||
|
|
c088fd5959 | ||
|
|
40bd23290f | ||
|
|
8c7f2bc2bd | ||
|
|
94181840b0 | ||
|
|
803afb7753 | ||
|
|
6f253a35de | ||
|
|
c56853b477 | ||
|
|
6640412546 | ||
|
|
8b58c13823 | ||
|
|
c36493a852 | ||
|
|
f2cd1c5573 | ||
|
|
d4a631f0cb | ||
|
|
c0208dab2e | ||
|
|
8dca6b8e44 | ||
|
|
4b1a7859aa | ||
|
|
6f28d90916 | ||
|
|
285e24455d | ||
|
|
d0c26b4bb7 | ||
|
|
a71d90d2c7 | ||
|
|
78e1468f51 | ||
|
|
9a1e1dbd1a | ||
|
|
3ef21188b1 | ||
|
|
65daa6c56a | ||
|
|
eb63f5d74f | ||
|
|
7da09349ec | ||
|
|
b2a28a12f6 | ||
|
|
0fe5d2a232 | ||
|
|
b50f9946bb | ||
|
|
bf28778432 | ||
|
|
d6dad64328 | ||
|
|
46003fddd5 | ||
|
|
2e7fc5fa14 | ||
|
|
7fb9b397ef | ||
|
|
cbe66d6c96 | ||
|
|
57d477c1da | ||
|
|
8e774faa3e | ||
|
|
6129323ca3 | ||
|
|
6d6ecdfe92 | ||
|
|
b66ae8d605 | ||
|
|
ed97af82b5 | ||
|
|
464f037768 | ||
|
|
024442da10 | ||
|
|
b0049df366 | ||
|
|
7115c1734e | ||
|
|
9b93ffef76 | ||
|
|
225b89ab4f | ||
|
|
d4464bf430 | ||
|
|
50731e00ef | ||
|
|
f9d3d22c14 | ||
|
|
607f3c5334 | ||
|
|
925c58aeaa | ||
|
|
447acf3b27 | ||
|
|
5bff6c3854 | ||
|
|
70f4086ecc | ||
|
|
b3bafdbba9 | ||
|
|
5788d7d284 | ||
|
|
a0c226d6ea | ||
|
|
921657f464 | ||
|
|
217ee3fa77 | ||
|
|
0aef613006 | ||
|
|
63e2bb8f6d | ||
|
|
ea0059a932 | ||
|
|
a95a6d804a | ||
|
|
3fbdd08037 | ||
|
|
e04040c4ea | ||
|
|
20a85cce5f | ||
|
|
2be7a59ff0 | ||
|
|
3102c0f981 | ||
|
|
8693a8f2c9 | ||
|
|
9bc4656525 | ||
|
|
544000177c | ||
|
|
2b1dbf7e36 | ||
|
|
641ec8a9eb | ||
|
|
c18929dbae | ||
|
|
a592f34216 | ||
|
|
4e2adf77cb | ||
|
|
9fba09f00a | ||
|
|
12d377b3bd | ||
|
|
cd1f81c8d9 | ||
|
|
f6774fd554 | ||
|
|
ea248061f3 | ||
|
|
1e2894dd46 | ||
|
|
92b607bd0e | ||
|
|
b766ea958a | ||
|
|
a7074db9f8 | ||
|
|
5c819b2018 | ||
|
|
c526df5143 | ||
|
|
31ed2ae746 | ||
|
|
702065eb3d | ||
|
|
c418266af6 | ||
|
|
9c8d80d763 | ||
|
|
007a8cb8bf | ||
|
|
2fc7d55d6c | ||
|
|
b3bdcea137 | ||
|
|
4673347125 | ||
|
|
f827f9f408 | ||
|
|
6a8aed5d3f | ||
|
|
5e54477cd1 | ||
|
|
ba9fcda886 | ||
|
|
c848d93316 | ||
|
|
d00c8f1ea0 | ||
|
|
9788a135aa | ||
|
|
899e6b1417 | ||
|
|
6f7f14b241 | ||
|
|
cc0d1b5910 | ||
|
|
0b6cd8154b | ||
|
|
c4cae5d6b4 | ||
|
|
f58959842b | ||
|
|
b813c155bc | ||
|
|
98e53ae941 | ||
|
|
4d993266b3 | ||
|
|
8da27926a1 | ||
|
|
7fae7acc91 | ||
|
|
47708d34df | ||
|
|
ab322f1194 | ||
|
|
aab45b16b0 | ||
|
|
586920d8a8 | ||
|
|
ac8a1c69ae | ||
|
|
604cd52a79 | ||
|
|
37109a8531 | ||
|
|
136db7b085 | ||
|
|
c177d59b7b | ||
|
|
fa9611f4f5 | ||
|
|
859e2958c0 | ||
|
|
0dda22833d | ||
|
|
ccb40910e2 | ||
|
|
eddaa9233c | ||
|
|
a09f5a3ba6 | ||
|
|
ed78a58455 | ||
|
|
b130d50bb3 | ||
|
|
7ab286753d | ||
|
|
bc6aadb0ed | ||
|
|
fd9c8b0922 | ||
|
|
2c9b9cadfe | ||
|
|
fb1ac0994d | ||
|
|
5ba8e293eb | ||
|
|
801ed0eb9f | ||
|
|
54503f98d4 | ||
|
|
903ff637e7 | ||
|
|
82ef5f6b6e | ||
|
|
398f09a1ce | ||
|
|
f29de07d0d | ||
|
|
8524f719c1 | ||
|
|
0a73e686f5 | ||
|
|
615b3d0507 |
@@ -1,7 +1,4 @@
|
||||
if PACKAGE_bbfdmd
|
||||
config BBF_VENDOR_EXTENSION
|
||||
bool "Enable Vendor Extension"
|
||||
default y
|
||||
|
||||
config BBF_VENDOR_PREFIX
|
||||
string "Vendor Prefix"
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bbfdm
|
||||
PKG_VERSION:=1.12.6
|
||||
PKG_VERSION:=1.12.26
|
||||
|
||||
USE_LOCAL:=0
|
||||
ifneq ($(USE_LOCAL),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bbfdm.git
|
||||
PKG_SOURCE_VERSION:=0a33d96b693ac5cc34ba57f6fd53417d6eaeac61
|
||||
PKG_SOURCE_VERSION:=811f0616c6a861c9b78d5a079a0f79f3eb0b23b2
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -145,14 +145,6 @@ define Package/bbfdmd/install
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/91-fix-bbfdmd-enabled-option $(1)/etc/uci-defaults/
|
||||
|
||||
ifeq ($(CONFIG_BBF_VENDOR_EXTENSION),y)
|
||||
$(BBFDM_INSTALL_CORE_PLUGIN) $(PKG_BUILD_DIR)/libbbfdm/vendor/vendor.json $(1)
|
||||
endif
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/share/bbfdm/scripts
|
||||
$(CP) $(PKG_BUILD_DIR)/utilities/files/usr/share/bbfdm/scripts/bbf_activate_handler.sh $(1)/usr/share/bbfdm/scripts/
|
||||
$(CP) $(PKG_BUILD_DIR)/utilities/files/usr/share/bbfdm/scripts/bbf_check_idle.sh $(1)/usr/share/bbfdm/scripts/
|
||||
endef
|
||||
|
||||
define Package/dm-service/install
|
||||
@@ -165,15 +157,19 @@ endef
|
||||
|
||||
define Package/bbf_configmngr/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DIR) $(1)/etc/bbfdm/
|
||||
ifeq ($(CONFIG_BBF_CONFIGMNGR_C_BACKEND),y)
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/utilities/bbf_configd $(1)/usr/sbin/
|
||||
$(INSTALL_BIN) ./files/etc/init.d/bbf_configd $(1)/etc/init.d/bbf_configd
|
||||
$(INSTALL_DIR) $(1)/usr/share/bbfdm/scripts
|
||||
$(CP) $(PKG_BUILD_DIR)/utilities/files/usr/share/bbfdm/scripts/bbf_config_notify.sh $(1)/usr/share/bbfdm/scripts/
|
||||
endif
|
||||
ifeq ($(CONFIG_BBF_CONFIGMNGR_SCRIPT_BACKEND),y)
|
||||
$(INSTALL_DIR) $(1)/usr/libexec/rpcd
|
||||
$(CP) $(PKG_BUILD_DIR)/utilities/files/usr/libexec/rpcd/bbf.config $(1)/usr/libexec/rpcd/bbf.config
|
||||
endif
|
||||
$(INSTALL_DATA) ./files/etc/bbfdm/critical_services.json $(1)/etc/bbfdm/
|
||||
endef
|
||||
|
||||
define Package/bbfdmd/prerm
|
||||
|
||||
@@ -1,5 +1,12 @@
|
||||
{
|
||||
"services_list": [
|
||||
"usp": [
|
||||
"firewall",
|
||||
"network",
|
||||
"dhcp",
|
||||
"wireless",
|
||||
"time"
|
||||
],
|
||||
"cwmp": [
|
||||
"firewall",
|
||||
"network",
|
||||
"dhcp",
|
||||
@@ -6,3 +6,7 @@ config bbfdmd 'bbfdmd'
|
||||
config micro_services 'micro_services'
|
||||
option enable '1'
|
||||
option enable_core '0'
|
||||
|
||||
|
||||
config reload_handler 'reload_handler'
|
||||
option log_level '1'
|
||||
|
||||
@@ -6,6 +6,10 @@ STOP=10
|
||||
USE_PROCD=1
|
||||
PROG=/usr/sbin/bbf_configd
|
||||
|
||||
log() {
|
||||
echo "${@}"|logger -t bbf.config -p info
|
||||
}
|
||||
|
||||
create_needed_directories()
|
||||
{
|
||||
mkdir -p /tmp/bbfdm/.cwmp
|
||||
@@ -15,11 +19,23 @@ create_needed_directories()
|
||||
|
||||
start_service()
|
||||
{
|
||||
local log_level
|
||||
|
||||
create_needed_directories
|
||||
|
||||
config_load bbfdm
|
||||
config_get log_level "reload_handler" log_level 2
|
||||
|
||||
procd_open_instance "bbf_configd"
|
||||
procd_set_param command ${PROG}
|
||||
#procd_append_param command -d
|
||||
procd_append_param command -l "${log_level}"
|
||||
procd_set_param respawn
|
||||
procd_close_instance "bbf_configd"
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
for config_file in /etc/config/*; do
|
||||
config_name=$(basename "$config_file")
|
||||
procd_add_config_trigger "config.change" "$config_name" /usr/share/bbfdm/scripts/bbf_config_notify.sh
|
||||
done
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=85
|
||||
START=60
|
||||
STOP=8
|
||||
|
||||
USE_PROCD=1
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=90
|
||||
START=97
|
||||
STOP=10
|
||||
|
||||
USE_PROCD=1
|
||||
|
||||
@@ -79,6 +79,11 @@ bbfdm_install_dm()
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ ! -f "${src}" ]; then
|
||||
echo "File $src does not exists..."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "${src##*.}" = "json" ]; then
|
||||
echo "Compacting BBFDM JSON file"
|
||||
minfile=$(mktemp)
|
||||
@@ -158,11 +163,15 @@ else
|
||||
if [ "${PLUGIN}" -eq "1" ]; then
|
||||
priority="${DATA:-0}"
|
||||
install_dir ${DEST}/${BBFDM_BASE_DM_PATH}/plugins
|
||||
|
||||
if [ "${priority}" -gt "0" ]; then
|
||||
# install with priority if defined
|
||||
bbfdm_install_dm ${SRC} ${DEST}/${BBFDM_BASE_DM_PATH}/plugins/${priority}_$(basename ${SRC})
|
||||
else
|
||||
elif [ "${priority}" -eq "0" ]; then
|
||||
bbfdm_install_dm ${SRC} ${DEST}/${BBFDM_BASE_DM_PATH}/plugins/$(basename ${SRC})
|
||||
else
|
||||
echo "# Priority should be an unsigned integer"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -27,6 +27,7 @@ obj_schema = {
|
||||
"protocols_t": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"none",
|
||||
"cwmp",
|
||||
"usp"
|
||||
]
|
||||
@@ -227,6 +228,7 @@ event_schema = {
|
||||
"protocols_t": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"none",
|
||||
"usp"
|
||||
]
|
||||
}
|
||||
@@ -254,6 +256,7 @@ command_schema = {
|
||||
"protocols_t": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"none",
|
||||
"usp"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -7,5 +7,11 @@ config BRIDGEMNGR_BRIDGE_VLAN
|
||||
help
|
||||
Set this option to use bridge-vlan as backend for VLAN objects.
|
||||
|
||||
config BRIDGEMNGR_BRIDGE_VENDOR_EXT
|
||||
bool "Use bridge BBF vendor extensions"
|
||||
default y
|
||||
help
|
||||
Set this option to use bridge BBF vendor extensions.
|
||||
|
||||
endmenu
|
||||
endif
|
||||
|
||||
@@ -5,14 +5,14 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bridgemngr
|
||||
PKG_VERSION:=1.0.5
|
||||
PKG_VERSION:=1.0.7
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/bridgemngr
|
||||
PKG_SOURCE_VERSION:=c0f2e17f6d4f96aecfe72ab90be885939413176d
|
||||
PKG_SOURCE_VERSION:=4f22b4a4270c8d9b94b9de6f5cbe2a1dd86a3027
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -26,7 +26,8 @@ include ../bbfdm/bbfdm.mk
|
||||
define Package/bridgemngr
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Bridge Manager
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libbbfdm-api
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
endef
|
||||
|
||||
define Package/bridgemngr/description
|
||||
@@ -47,8 +48,9 @@ endif
|
||||
|
||||
define Package/bridgemngr/install
|
||||
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/libbridgemngr.so $(1) $(PKG_NAME)
|
||||
ifeq ($(findstring iopsys,$(CONFIG_BBF_VENDOR_LIST)),iopsys)
|
||||
ifeq ($(CONFIG_BRIDGEMNGR_BRIDGE_VENDOR_EXT), y)
|
||||
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/src/libbridgeext.so $(1) $(PKG_NAME)
|
||||
$(BBFDM_INSTALL_MS_PLUGIN) ./files/VLAN_Filtering_Extension.json $(1) $(PKG_NAME)
|
||||
endif
|
||||
endef
|
||||
|
||||
|
||||
31
bridgemngr/files/VLAN_Filtering_Extension.json
Normal file
31
bridgemngr/files/VLAN_Filtering_Extension.json
Normal file
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"json_plugin_version": 2,
|
||||
"Device.Bridging.Bridge.{i}.": {
|
||||
"type": "object",
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"access": true,
|
||||
"array": true,
|
||||
"{BBF_VENDOR_PREFIX}VLANFiltering": {
|
||||
"type": "boolean",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "boolean",
|
||||
"description": "Enable or disable VLAN Filtering on this bridge.",
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "vlan_filtering"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bulkdata
|
||||
PKG_VERSION:=2.1.12
|
||||
PKG_VERSION:=2.1.14
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bulkdata.git
|
||||
PKG_SOURCE_VERSION:=1c780a8a8f7b5b49aba394da5cfe5ccb10c28652
|
||||
PKG_SOURCE_VERSION:=93c9e87cb9f8f635cece1473cff6f67cff9ff7c0
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -24,12 +24,17 @@ PKG_LICENSE_FILES:=LICENSE
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/iopsys/bbfdm/bbfdm.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
define Package/bulkdata
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=BBF BulkData Collection
|
||||
DEPENDS:=+libubus +libuci +libubox +libjson-c +libcurl +libblobmsg-json +zlib
|
||||
DEPENDS:=+ubus +libuci +libubox +libjson-c +libcurl +libblobmsg-json +zlib
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus
|
||||
endef
|
||||
|
||||
define Package/bulkdata/description
|
||||
BulkData daemon for TR069 with bbfdm backend.
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
@@ -42,16 +47,13 @@ define Build/Prepare
|
||||
endef
|
||||
endif
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
define Package/bulkdata/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bulkdatad $(1)/usr/sbin/
|
||||
$(INSTALL_DATA) ./files/etc/config/bulkdata $(1)/etc/config/
|
||||
$(INSTALL_BIN) ./files/etc/init.d/bulkdatad $(1)/etc/init.d/
|
||||
$(INSTALL_DATA) ./files/etc/uci-defaults/95-bulkdata-translation-options $(1)/etc/uci-defaults/
|
||||
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/bbf_plugin/bulkdata.json $(1) $(PKG_NAME)
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
$(eval $(call BuildPackage,bulkdata))
|
||||
|
||||
@@ -1,960 +0,0 @@
|
||||
{
|
||||
"json_plugin_version": 2,
|
||||
"Device.BulkData.": {
|
||||
"type": "object",
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"access": false,
|
||||
"array": false,
|
||||
"Enable": {
|
||||
"type": "boolean",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "boolean",
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "bulkdata",
|
||||
"section": {
|
||||
"name": "bulkdata"
|
||||
},
|
||||
"option": {
|
||||
"name": "enable"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"Status": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": false,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "string",
|
||||
"enumerations": [
|
||||
"Enabled",
|
||||
"Disabled",
|
||||
"Error"
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "bulkdata",
|
||||
"section": {
|
||||
"name": "bulkdata"
|
||||
},
|
||||
"option": {
|
||||
"name": "enable"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"MinReportingInterval": {
|
||||
"type": "unsignedInt",
|
||||
"read": true,
|
||||
"write": false,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"default": "0",
|
||||
"datatype": "unsignedInt",
|
||||
"unit": "seconds"
|
||||
},
|
||||
"Protocols": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": false,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"default": "HTTP",
|
||||
"list": {
|
||||
"datatype": "string",
|
||||
"enumerations": [
|
||||
"Streaming",
|
||||
"File",
|
||||
"HTTP",
|
||||
"MQTT"
|
||||
]
|
||||
}
|
||||
},
|
||||
"EncodingTypes": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": false,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"default": "JSON,CSV",
|
||||
"list": {
|
||||
"datatype": "string",
|
||||
"enumerations": [
|
||||
"XML",
|
||||
"XDR",
|
||||
"CSV",
|
||||
"JSON"
|
||||
]
|
||||
}
|
||||
},
|
||||
"ParameterWildCardSupported": {
|
||||
"type": "boolean",
|
||||
"read": true,
|
||||
"write": false,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"default": "1",
|
||||
"datatype": "boolean"
|
||||
},
|
||||
"MaxNumberOfProfiles": {
|
||||
"type": "int",
|
||||
"read": true,
|
||||
"write": false,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"default": "-1",
|
||||
"datatype": "int",
|
||||
"range": [
|
||||
{
|
||||
"min": -1
|
||||
}
|
||||
]
|
||||
},
|
||||
"MaxNumberOfParameterReferences": {
|
||||
"type": "int",
|
||||
"read": true,
|
||||
"write": false,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"default": "-1",
|
||||
"datatype": "int",
|
||||
"range": [
|
||||
{
|
||||
"min": -1
|
||||
}
|
||||
]
|
||||
},
|
||||
"ProfileNumberOfEntries": {
|
||||
"type": "unsignedInt",
|
||||
"read": true,
|
||||
"write": false,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "unsignedInt",
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "bulkdata",
|
||||
"section": {
|
||||
"type": "profile"
|
||||
},
|
||||
"option": {
|
||||
"name": "@Count"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"Device.BulkData.Profile.{i}.": {
|
||||
"type": "object",
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"access": true,
|
||||
"array": true,
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "bulkdata",
|
||||
"section": {
|
||||
"type": "profile"
|
||||
},
|
||||
"dmmapfile": "dmmap_bulkdata"
|
||||
}
|
||||
}
|
||||
],
|
||||
"Enable": {
|
||||
"type": "boolean",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "boolean",
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "enable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Alias": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "Alias",
|
||||
"range": [
|
||||
{
|
||||
"max": 64
|
||||
}
|
||||
],
|
||||
"flags": [
|
||||
"Unique"
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "alias"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Name": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "string",
|
||||
"range": [
|
||||
{
|
||||
"max": 255
|
||||
}
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "name"
|
||||
}
|
||||
]
|
||||
},
|
||||
"NumberOfRetainedFailedReports": {
|
||||
"type": "int",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "int",
|
||||
"range": [
|
||||
{
|
||||
"min": -1
|
||||
}
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "nbre_of_retained_failed_reports"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Protocol": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "string",
|
||||
"enumerations": [
|
||||
"Streaming",
|
||||
"File",
|
||||
"HTTP"
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "protocol"
|
||||
}
|
||||
]
|
||||
},
|
||||
"EncodingType": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "string",
|
||||
"enumerations": [
|
||||
"XML",
|
||||
"XDR",
|
||||
"CSV",
|
||||
"JSON"
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "encoding_type"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ReportingInterval": {
|
||||
"type": "unsignedInt",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "unsignedInt",
|
||||
"range": [
|
||||
{
|
||||
"min": 1
|
||||
}
|
||||
],
|
||||
"unit": "seconds",
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "reporting_interval"
|
||||
}
|
||||
]
|
||||
},
|
||||
"TimeReference": {
|
||||
"type": "dateTime",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "dateTime",
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "time_reference"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ParameterNumberOfEntries": {
|
||||
"type": "unsignedInt",
|
||||
"read": true,
|
||||
"write": false,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "unsignedInt",
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "bulkdata",
|
||||
"section": {
|
||||
"type": "profile_parameter"
|
||||
},
|
||||
"option": {
|
||||
"name": "@Count"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"Device.BulkData.Profile.{i}.Parameter.{i}.": {
|
||||
"type": "object",
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"access": true,
|
||||
"array": true,
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "bulkdata",
|
||||
"section": {
|
||||
"type": "profile_parameter"
|
||||
},
|
||||
"dmmapfile": "dmmap_bulkdata"
|
||||
}
|
||||
}
|
||||
],
|
||||
"Name": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "string",
|
||||
"range": [
|
||||
{
|
||||
"max": 64
|
||||
}
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "name"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Reference": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "string",
|
||||
"range": [
|
||||
{
|
||||
"max": 256
|
||||
}
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "reference"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"Device.BulkData.Profile.{i}.CSVEncoding.": {
|
||||
"type": "object",
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"access": false,
|
||||
"array": false,
|
||||
"FieldSeparator": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "string",
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "csv_encoding_field_separator"
|
||||
}
|
||||
]
|
||||
},
|
||||
"RowSeparator": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "string",
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "csv_encoding_row_separator"
|
||||
}
|
||||
]
|
||||
},
|
||||
"EscapeCharacter": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "string",
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "csv_encoding_escape_character"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ReportFormat": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "string",
|
||||
"enumerations": [
|
||||
"ParameterPerRow",
|
||||
"ParameterPerColumn"
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "csv_encoding_report_format"
|
||||
}
|
||||
]
|
||||
},
|
||||
"RowTimestamp": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "string",
|
||||
"enumerations": [
|
||||
"Unix-Epoch",
|
||||
"ISO-8601",
|
||||
"None"
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "csv_encoding_row_time_stamp"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"Device.BulkData.Profile.{i}.JSONEncoding.": {
|
||||
"type": "object",
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"access": false,
|
||||
"array": false,
|
||||
"ReportFormat": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "string",
|
||||
"enumerations": [
|
||||
"ObjectHierarchy",
|
||||
"NameValuePair"
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "json_encoding_report_format"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ReportTimestamp": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "string",
|
||||
"enumerations": [
|
||||
"Unix-Epoch",
|
||||
"ISO-8601",
|
||||
"None"
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "json_encoding_report_time_stamp"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"Device.BulkData.Profile.{i}.HTTP.": {
|
||||
"type": "object",
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"access": false,
|
||||
"array": false,
|
||||
"URL": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "URL",
|
||||
"range": [
|
||||
{
|
||||
"max": 2048
|
||||
}
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "http_url"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Username": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "string",
|
||||
"range": [
|
||||
{
|
||||
"max": 256
|
||||
}
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "http_username"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Password": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "string",
|
||||
"range": [
|
||||
{
|
||||
"max": 256
|
||||
}
|
||||
],
|
||||
"flags": [
|
||||
"Secure"
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "http_password"
|
||||
}
|
||||
]
|
||||
},
|
||||
"CompressionsSupported": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": false,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"default": "GZIP",
|
||||
"list": {
|
||||
"datatype": "string",
|
||||
"enumerations": [
|
||||
"GZIP",
|
||||
"Compress",
|
||||
"Deflate"
|
||||
]
|
||||
}
|
||||
},
|
||||
"Compression": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "string",
|
||||
"enumerations": [
|
||||
"GZIP",
|
||||
"Compress",
|
||||
"Deflate"
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "http_compression"
|
||||
}
|
||||
]
|
||||
},
|
||||
"MethodsSupported": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": false,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"default": "POST,PUT",
|
||||
"list": {
|
||||
"datatype": "string",
|
||||
"enumerations": [
|
||||
"POST",
|
||||
"PUT"
|
||||
]
|
||||
}
|
||||
},
|
||||
"Method": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "string",
|
||||
"enumerations": [
|
||||
"POST",
|
||||
"PUT"
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "http_method"
|
||||
}
|
||||
]
|
||||
},
|
||||
"UseDateHeader": {
|
||||
"type": "boolean",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "boolean",
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "http_use_date_header"
|
||||
}
|
||||
]
|
||||
},
|
||||
"RetryEnable": {
|
||||
"type": "boolean",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "boolean",
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "http_retry_enable"
|
||||
}
|
||||
]
|
||||
},
|
||||
"RetryMinimumWaitInterval": {
|
||||
"type": "unsignedInt",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "unsignedInt",
|
||||
"range": [
|
||||
{
|
||||
"min": 1,
|
||||
"max": 65535
|
||||
}
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "http_retry_minimum_wait_interval"
|
||||
}
|
||||
]
|
||||
},
|
||||
"RetryIntervalMultiplier": {
|
||||
"type": "unsignedInt",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "unsignedInt",
|
||||
"range": [
|
||||
{
|
||||
"min": 1000,
|
||||
"max": 65535
|
||||
}
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "http_retry_interval_multiplier"
|
||||
}
|
||||
]
|
||||
},
|
||||
"RequestURIParameterNumberOfEntries": {
|
||||
"type": "unsignedInt",
|
||||
"read": true,
|
||||
"write": false,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "unsignedInt",
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "bulkdata",
|
||||
"section": {
|
||||
"type": "profile_http_request_uri_parameter"
|
||||
},
|
||||
"option": {
|
||||
"name": "@Count"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"PersistAcrossReboot": {
|
||||
"type": "boolean",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "boolean",
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "http_persist_across_reboot"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Device.BulkData.Profile.{i}.HTTP.RequestURIParameter.{i}.": {
|
||||
"type": "object",
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"access": true,
|
||||
"array": true,
|
||||
"mapping": [
|
||||
{
|
||||
"type": "uci",
|
||||
"uci": {
|
||||
"file": "bulkdata",
|
||||
"section": {
|
||||
"type": "profile_http_request_uri_parameter"
|
||||
},
|
||||
"dmmapfile": "dmmap_bulkdata"
|
||||
}
|
||||
}
|
||||
],
|
||||
"Name": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "string",
|
||||
"range": [
|
||||
{
|
||||
"max": 64
|
||||
}
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "name"
|
||||
}
|
||||
]
|
||||
},
|
||||
"Reference": {
|
||||
"type": "string",
|
||||
"read": true,
|
||||
"write": true,
|
||||
"protocols": [
|
||||
"cwmp",
|
||||
"usp"
|
||||
],
|
||||
"datatype": "string",
|
||||
"range": [
|
||||
{
|
||||
"max": 256
|
||||
}
|
||||
],
|
||||
"mapping": [
|
||||
{
|
||||
"data": "@Parent",
|
||||
"type": "uci_sec",
|
||||
"key": "reference"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,34 +7,24 @@ USE_PROCD=1
|
||||
PROG="/usr/sbin/bulkdatad"
|
||||
|
||||
start_service() {
|
||||
local enable
|
||||
|
||||
config_load bulkdata
|
||||
config_get_bool enable bulkdata enable 1
|
||||
|
||||
if [ ! -f "/var/state/bulkdatad" ]; then
|
||||
touch /var/state/bulkdatad
|
||||
uci -q -c /var/state set bulkdatad.global='global'
|
||||
uci -q -c /var/state commit bulkdatad
|
||||
fi
|
||||
|
||||
if [ "$enable" -eq "1" ]; then
|
||||
procd_open_instance "bulkdata"
|
||||
procd_set_param command "$PROG"
|
||||
procd_set_param respawn
|
||||
procd_close_instance "bulkdata"
|
||||
else
|
||||
uci -q -c /var/state set bulkdatad.global.status='Disabled'
|
||||
uci -q -c /var/state commit bulkdatad
|
||||
fi
|
||||
procd_open_instance "bulkdata"
|
||||
procd_set_param command "$PROG"
|
||||
procd_set_param respawn
|
||||
procd_close_instance "bulkdata"
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
ret=$(ubus call service list '{"name":"bulkdatad"}' | jsonfilter -qe '@.bulkdatad.instances.bulkdata.running')
|
||||
if [ "$ret" != "true" ]; then
|
||||
stop
|
||||
start
|
||||
else
|
||||
ubus send bulkdata.reload
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger bulkdata
|
||||
}
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
PROFILE_COUNT=1
|
||||
|
||||
get_next_count()
|
||||
{
|
||||
local config="$1"
|
||||
local default_name="${2}"
|
||||
local count=${3}
|
||||
local found=0
|
||||
|
||||
if [ -z "$count" ]; then
|
||||
count=1
|
||||
fi
|
||||
|
||||
while [ "${found}" -ne 1 ]; do
|
||||
uci -q get "${config}"."${default_name}"_${count} >/dev/null
|
||||
if [ "$?" -eq 0 ]; then
|
||||
count=$((count + 1))
|
||||
else
|
||||
found=1;
|
||||
fi
|
||||
done
|
||||
|
||||
echo "${default_name}_${count}"
|
||||
}
|
||||
|
||||
translate_profile_id_to_profile_name() {
|
||||
local section="${1}"
|
||||
local profile_id="${2}"
|
||||
local profile_name="${3}"
|
||||
local curr_profile_id
|
||||
|
||||
config_get curr_profile_id "${section}" profile_id
|
||||
|
||||
[ -n "${curr_profile_id}" ] || return
|
||||
|
||||
[ "${curr_profile_id}" != "${profile_id}" ] && return
|
||||
|
||||
uci -q set bulkdata."${section}".profile_name="${profile_name}"
|
||||
uci -q set bulkdata."${section}".profile_id=""
|
||||
}
|
||||
|
||||
update_profile_sections() {
|
||||
local section="${1}"
|
||||
local default="${2}"
|
||||
local profile_name
|
||||
|
||||
config_get profile_id "${section}" profile_id
|
||||
|
||||
[ -n "${profile_id}" ] || return
|
||||
|
||||
case "${section}" in
|
||||
"cfg"*)
|
||||
profile_name="$(get_next_count bulkdata "${default}" ${PROFILE_COUNT})"
|
||||
uci_rename bulkdata "${section}" "${profile_name}"
|
||||
;;
|
||||
esac
|
||||
PROFILE_COUNT=$((PROFILE_COUNT + 1))
|
||||
|
||||
[ -n "$profile_name" ] && section="${profile_name}"
|
||||
|
||||
uci -q set bulkdata."${section}".profile_id=""
|
||||
|
||||
config_foreach translate_profile_id_to_profile_name profile_parameter "${profile_id}" "${profile_name}"
|
||||
config_foreach translate_profile_id_to_profile_name profile_http_request_uri_parameter "${profile_id}" "${profile_name}"
|
||||
}
|
||||
|
||||
config_load bulkdata
|
||||
config_foreach update_profile_sections profile profile
|
||||
uci commit bulkdata
|
||||
|
||||
exit 0
|
||||
52
cmph/Makefile
Normal file
52
cmph/Makefile
Normal file
@@ -0,0 +1,52 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=cmph
|
||||
PKG_VERSION:=2.0.2
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=cmph-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@SF/cmph/
|
||||
PKG_MD5SUM:=51ec5329b47774d251a96eaaafdb409e
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
|
||||
PKG_FIXUP:=autoreconf
|
||||
|
||||
PKG_LICENSE:=LGPLv2
|
||||
PKG_LICENSE_FILES:=LGPL-2
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=C Minimal Perfect Hashing library
|
||||
URL:=https://sourceforge.net/projects/cmph/
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
C Minimal Perfect Hashing (CMPH) library allows the creation of minimal perfect hash functions for large data sets.
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
$(call Build/Configure/Default)
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/cmph.h $(1)/usr/include/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/cmph_time.h $(1)/usr/include/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/src/cmph_types.h $(1)/usr/include/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/src/.libs/libcmph.a $(1)/usr/lib/
|
||||
$(CP) $(PKG_BUILD_DIR)/src/.libs/libcmph.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/src/.libs/libcmph.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ddnsmngr
|
||||
PKG_VERSION:=1.0.8
|
||||
PKG_VERSION:=1.0.9
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/ddnsmngr.git
|
||||
PKG_SOURCE_VERSION:=68c54ad5b537a7dfff7c939707bfe8f1a3023c46
|
||||
PKG_SOURCE_VERSION:=5144e73fad92d23ae706894a4357436c3fe89355
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -28,7 +28,8 @@ define Package/$(PKG_NAME)
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=Dynamic DNS manager
|
||||
DEPENDS:=+libbbfdm-api +DDNSMNGR_BACKEND_DDNSSCRIPT:ddns-scripts +DDNSMNGR_BACKEND_INADYN:inadyn
|
||||
DEPENDS:=+DDNSMNGR_BACKEND_DDNSSCRIPT:ddns-scripts +DDNSMNGR_BACKEND_INADYN:inadyn
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
MENU:=1
|
||||
endef
|
||||
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=decollector
|
||||
PKG_VERSION:=6.1.0.0
|
||||
PKG_VERSION:=6.1.0.6
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=2efa50c2bb5b8d5ed3e72c27395a7f2516bcbd44
|
||||
PKG_SOURCE_VERSION:=37669ed8365397d65656f11a04f6af8cae57607c
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/decollector.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
@@ -2,13 +2,13 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dectmngr
|
||||
PKG_RELEASE:=3
|
||||
PKG_VERSION:=3.6.9
|
||||
PKG_VERSION:=3.7.3
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=c5254120c2c8b43936e2f9f4f9a3827784d60a43
|
||||
PKG_SOURCE_VERSION:=393dfd7637fdeccc24ef286c3daec9a232896b98
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
@@ -28,7 +28,7 @@ include $(INCLUDE_DIR)/package.mk
|
||||
define Package/$(PKG_NAME)
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=DECT Manager
|
||||
DEPENDS:= +libubox +ubus +uci +libxml2 +libjson-c +gpiod-tools
|
||||
DEPENDS:= +libubox +ubus +uci +libxml2 +libjson-c +gpiod-tools +voicemngr
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dhcpmngr
|
||||
PKG_VERSION:=1.0.3
|
||||
PKG_VERSION:=1.0.4
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/dhcpmngr.git
|
||||
PKG_SOURCE_VERSION:=93f756f80a9391afd9b01f2608e031c4db3ca48b
|
||||
PKG_SOURCE_VERSION:=2a517188211849bcc324a9f9727eeb34d076c032
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -28,9 +28,11 @@ define Package/dhcpmngr
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=Package to add Device.DHCPv4 and v6 data model support.
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api +odhcpd
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
DEPENDS+=+DNSMNGR_DNS_SD:umdns
|
||||
DEPENDS+=+DNSMNGR_BACKEND_DNSMASQ:dnsmasq
|
||||
DEPENDS+=+DNSMNGR_BACKEND_UNBOUND:odhcpd
|
||||
endef
|
||||
|
||||
define Package/dhcpmngr/description
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dnsmngr
|
||||
PKG_VERSION:=1.0.10
|
||||
PKG_VERSION:=1.0.12
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/dnsmngr.git
|
||||
PKG_SOURCE_VERSION:=dd7a285798b48e199f5e5d90d9c20cb5e0c14888
|
||||
PKG_SOURCE_VERSION:=fb49088ddb498980e2c91f03aea10bd502caeca1
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -27,7 +27,8 @@ MAKE_PATH:=src
|
||||
define Package/dnsmngr
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api +odhcpd
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +odhcpd
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
DEPENDS+=+DNSMNGR_DNS_SD:umdns
|
||||
DEPENDS+=+DNSMNGR_BACKEND_DNSMASQ:dnsmasq
|
||||
DEPENDS+=+DNSMNGR_BACKEND_UNBOUND:unbound-daemon +DNSMNGR_BACKEND_UNBOUND:unbound-control
|
||||
|
||||
@@ -40,7 +40,8 @@ define Package/dslmngr
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=XDSL status and configration utility
|
||||
DEPENDS:=+libdsl +libuci +libubox +ubus +libpthread +libnl-genl +libeasy +libbbfdm-api
|
||||
DEPENDS:=+libdsl +libuci +libubox +ubus +libpthread +libnl-genl +libeasy
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
endef
|
||||
|
||||
define Package/dslmngr/description
|
||||
|
||||
@@ -6,13 +6,13 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=ebtables-extensions
|
||||
PKG_VERSION:=1.0.4
|
||||
PKG_VERSION:=2.0.1
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=35fb79f95c47d90e3791c7e126048b451f078f24
|
||||
PKG_SOURCE_VERSION:=5ef3a5b057f6b59a4b90bd5ca15a852b0c27f3b3
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/ebtables-extensions.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
@@ -25,7 +25,7 @@ define KernelPackage/vlantranslation
|
||||
TITLE:=Kernel module for ebtables VLAN translation
|
||||
FILES:=$(PKG_BUILD_DIR)/src/ebt_vlantranslation.ko
|
||||
DEPENDS+=+kmod-ebtables
|
||||
AUTOLOAD:=$(call AutoLoad,30,ebt_vlantranslation,1)
|
||||
AUTOLOAD:=$(call AutoLoad,30,ebt_vlantranslation)
|
||||
KCONFIG:=
|
||||
endef
|
||||
|
||||
@@ -34,43 +34,182 @@ define KernelPackage/dscp2pbit
|
||||
TITLE:=Kernel module for DSCP-to-Pbit mapping
|
||||
DEPENDS+=+kmod-ebtables
|
||||
FILES:=$(PKG_BUILD_DIR)/src/ebt_dscp2pbit.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,ebt_dscp2pbit,1)
|
||||
AUTOLOAD:=$(call AutoLoad,30,ebt_dscp2pbit)
|
||||
KCONFIG:=
|
||||
endef
|
||||
|
||||
define KernelPackage/dhcp
|
||||
SUBMENU:=Other modules
|
||||
TITLE:=Kernel module for ebtables DHCP snooping
|
||||
FILES:=$(PKG_BUILD_DIR)/src/ebt_dhcp.ko
|
||||
DEPENDS+=+kmod-ebtables
|
||||
AUTOLOAD:=$(call AutoLoad,30,ebt_dhcp)
|
||||
KCONFIG:=
|
||||
endef
|
||||
|
||||
define KernelPackage/dhcpv6
|
||||
SUBMENU:=Other modules
|
||||
TITLE:=Kernel module for ebtables DHCPv6 snooping
|
||||
FILES:=$(PKG_BUILD_DIR)/src/ebt_dhcpv6.ko
|
||||
DEPENDS+=+kmod-ebtables
|
||||
AUTOLOAD:=$(call AutoLoad,30,ebt_dhcpv6)
|
||||
KCONFIG:=
|
||||
endef
|
||||
|
||||
define KernelPackage/ra
|
||||
SUBMENU:=Other modules
|
||||
TITLE:=Kernel module for ebtables NDP/RA snooping
|
||||
FILES:=$(PKG_BUILD_DIR)/src/ebt_ra.ko
|
||||
DEPENDS+=+kmod-ebtables
|
||||
AUTOLOAD:=$(call AutoLoad,30,ebt_ra)
|
||||
KCONFIG:=
|
||||
endef
|
||||
|
||||
define KernelPackage/dns
|
||||
SUBMENU:=Other modules
|
||||
TITLE:=Kernel module for ebtables DNS manipulation
|
||||
FILES:=$(PKG_BUILD_DIR)/src/ebt_dns.ko
|
||||
DEPENDS+=+kmod-ebtables
|
||||
AUTOLOAD:=$(call AutoLoad,30,ebt_dns)
|
||||
KCONFIG:=
|
||||
endef
|
||||
|
||||
define KernelPackage/pppoe_disc
|
||||
SUBMENU:=Other modules
|
||||
TITLE:=Kernel module for ebtables PPPoE manipulation
|
||||
FILES:=$(PKG_BUILD_DIR)/src/ebt_pppoe_disc.ko
|
||||
DEPENDS+=+kmod-ebtables
|
||||
AUTOLOAD:=$(call AutoLoad,30,ebt_pppoe_disc)
|
||||
KCONFIG:=
|
||||
endef
|
||||
|
||||
define KernelPackage/l2pt
|
||||
SUBMENU:=Other modules
|
||||
TITLE:=Kernel module for ebtables L2CP tunneling
|
||||
FILES:=$(PKG_BUILD_DIR)/src/ebt_l2pt.ko
|
||||
DEPENDS+=@TARGET_airoha +kmod-ebtables
|
||||
AUTOLOAD:=$(call AutoLoad,30,ebt_l2pt)
|
||||
KCONFIG:=
|
||||
endef
|
||||
|
||||
define KernelPackage/xtarp
|
||||
SUBMENU:=Other modules
|
||||
TITLE:=Kernel module for ebtables extended ARP matching
|
||||
FILES:=$(PKG_BUILD_DIR)/src/ebt_xtarp.ko
|
||||
DEPENDS+=+kmod-ebtables
|
||||
AUTOLOAD:=$(call AutoLoad,30,ebt_xtarp)
|
||||
KCONFIG:=
|
||||
endef
|
||||
|
||||
define KernelPackage/xtip
|
||||
SUBMENU:=Other modules
|
||||
TITLE:=Kernel module for ebtables extended IPv4 matching
|
||||
FILES:=$(PKG_BUILD_DIR)/src/ebt_xtip.ko
|
||||
DEPENDS+=+kmod-ebtables
|
||||
AUTOLOAD:=$(call AutoLoad,30,ebt_xtip)
|
||||
KCONFIG:=
|
||||
endef
|
||||
|
||||
define KernelPackage/xtip6
|
||||
SUBMENU:=Other modules
|
||||
TITLE:=Kernel module for ebtables extended IPv6 matching
|
||||
FILES:=$(PKG_BUILD_DIR)/src/ebt_xtip6.ko
|
||||
DEPENDS+=+kmod-ebtables
|
||||
AUTOLOAD:=$(call AutoLoad,30,ebt_xtip6)
|
||||
KCONFIG:=
|
||||
endef
|
||||
|
||||
define KernelPackage/dhcp/description
|
||||
Kernel module to enable DHCP snooping for ebtables
|
||||
endef
|
||||
|
||||
define KernelPackage/dhcpv6/description
|
||||
Kernel module to enable DHCPv6 snooping for ebtables
|
||||
endef
|
||||
|
||||
define KernelPackage/ra/description
|
||||
Kernel module to enable NDP/RA snooping for ebtables
|
||||
endef
|
||||
|
||||
define KernelPackage/dns/description
|
||||
Kernel module to enable DNS manipulation for ebtables
|
||||
endef
|
||||
|
||||
define KernelPackage/pppoe_disc/description
|
||||
Kernel module to enable PPPoE manipulation for ebtables
|
||||
endef
|
||||
|
||||
define KernelPackage/l2pt/description
|
||||
Kernel module to enable L2CP tunneling for ebtables
|
||||
endef
|
||||
|
||||
define KernelPackage/xtarp/description
|
||||
Kernel module to enable extended ARP matching for ebtables
|
||||
endef
|
||||
|
||||
define KernelPackage/xtip/description
|
||||
Kernel module to enable extended IPv4 matching for ebtables
|
||||
endef
|
||||
|
||||
define KernelPackage/xtip6/description
|
||||
Kernel module to enable extended IPv6 matching for ebtables
|
||||
endef
|
||||
|
||||
define KernelPackage/vlantranslation/description
|
||||
Kernel module to enable VLAN translation for ebtables
|
||||
endef
|
||||
|
||||
define KernelPackage/dscp2pbit/description
|
||||
Kernel module to enableDSCP-to-Pbit mapping for ebtables
|
||||
Kernel module to enable DSCP-to-Pbit mapping for ebtables
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_TARGET_brcmbca),y)
|
||||
include ../../broadcom/bcmkernel/bcm-kernel-toolchain.mk
|
||||
endif
|
||||
|
||||
define Build/Prepare
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
$(CP) -rf ./src/* $(PKG_BUILD_DIR)/
|
||||
$(CP) $(PKG_BUILD_DIR)/src/ebt_vlantranslation.h $(LINUX_DIR)/include/uapi/linux/netfilter_bridge/
|
||||
$(CP) $(PKG_BUILD_DIR)/src/ebt_dscp2pbit.h $(LINUX_DIR)/include/uapi/linux/netfilter_bridge/
|
||||
endef
|
||||
$(CP) -rf ./ebtables-extensions/* $(PKG_BUILD_DIR)/
|
||||
else
|
||||
define Build/Prepare
|
||||
$(Build/Prepare/Default)
|
||||
endif
|
||||
$(CP) $(PKG_BUILD_DIR)/src/ebt_vlantranslation.h $(LINUX_DIR)/include/uapi/linux/netfilter_bridge/
|
||||
$(CP) $(PKG_BUILD_DIR)/src/ebt_dscp2pbit.h $(LINUX_DIR)/include/uapi/linux/netfilter_bridge/
|
||||
endef
|
||||
$(CP) $(PKG_BUILD_DIR)/src/ebt_dhcp.h $(LINUX_DIR)/include/uapi/linux/netfilter_bridge/
|
||||
$(CP) $(PKG_BUILD_DIR)/src/ebt_dhcpv6.h $(LINUX_DIR)/include/uapi/linux/netfilter_bridge/
|
||||
$(CP) $(PKG_BUILD_DIR)/src/ebt_ra.h $(LINUX_DIR)/include/uapi/linux/netfilter_bridge/
|
||||
$(CP) $(PKG_BUILD_DIR)/src/ebt_dns.h $(LINUX_DIR)/include/uapi/linux/netfilter_bridge/
|
||||
$(CP) $(PKG_BUILD_DIR)/src/ebt_pppoe_disc.h $(LINUX_DIR)/include/uapi/linux/netfilter_bridge/
|
||||
ifeq ($(CONFIG_TARGET_airoha),y)
|
||||
$(CP) $(PKG_BUILD_DIR)/src/ebt_l2pt.h $(LINUX_DIR)/include/uapi/linux/netfilter_bridge/
|
||||
endif
|
||||
$(CP) $(PKG_BUILD_DIR)/src/ebt_xtarp.h $(LINUX_DIR)/include/uapi/linux/netfilter_bridge/
|
||||
$(CP) $(PKG_BUILD_DIR)/src/ebt_xtip.h $(LINUX_DIR)/include/uapi/linux/netfilter_bridge/
|
||||
$(CP) $(PKG_BUILD_DIR)/src/ebt_xtip6.h $(LINUX_DIR)/include/uapi/linux/netfilter_bridge/
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/include/uapi/linux/netfilter_bridge/
|
||||
$(CP) $(PKG_BUILD_DIR)/src/ebt_vlantranslation.h $(1)/include/uapi/linux/netfilter_bridge/
|
||||
$(CP) $(PKG_BUILD_DIR)/src/ebt_dscp2pbit.h $(1)/include/uapi/linux/netfilter_bridge/
|
||||
$(CP) $(PKG_BUILD_DIR)/src/ebt_dhcp.h $(1)/include/uapi/linux/netfilter_bridge/
|
||||
$(CP) $(PKG_BUILD_DIR)/src/ebt_dhcpv6.h $(1)/include/uapi/linux/netfilter_bridge/
|
||||
$(CP) $(PKG_BUILD_DIR)/src/ebt_ra.h $(1)/include/uapi/linux/netfilter_bridge/
|
||||
$(CP) $(PKG_BUILD_DIR)/src/ebt_dns.h $(1)/include/uapi/linux/netfilter_bridge/
|
||||
$(CP) $(PKG_BUILD_DIR)/src/ebt_pppoe_disc.h $(1)/include/uapi/linux/netfilter_bridge/
|
||||
ifeq ($(CONFIG_TARGET_airoha),y)
|
||||
$(CP) $(PKG_BUILD_DIR)/src/ebt_l2pt.h $(1)/include/uapi/linux/netfilter_bridge/
|
||||
endif
|
||||
$(CP) $(PKG_BUILD_DIR)/src/ebt_xtarp.h $(1)/include/uapi/linux/netfilter_bridge/
|
||||
$(CP) $(PKG_BUILD_DIR)/src/ebt_xtip.h $(1)/include/uapi/linux/netfilter_bridge/
|
||||
$(CP) $(PKG_BUILD_DIR)/src/ebt_xtip6.h $(1)/include/uapi/linux/netfilter_bridge/
|
||||
endef
|
||||
|
||||
KERNEL_MAKE_FLAGS += -I$(LINUX_DIR)/include
|
||||
ifeq ($(CONFIG_TARGET_airoha),y)
|
||||
KERNEL_MAKE_FLAGS += PLATFORM="ECONET"
|
||||
endif
|
||||
|
||||
define Build/Compile
|
||||
$(KERNEL_MAKE) M="$(PKG_BUILD_DIR)/src" modules
|
||||
@@ -78,3 +217,12 @@ endef
|
||||
|
||||
$(eval $(call KernelPackage,vlantranslation))
|
||||
$(eval $(call KernelPackage,dscp2pbit))
|
||||
$(eval $(call KernelPackage,dhcp))
|
||||
$(eval $(call KernelPackage,dhcpv6))
|
||||
$(eval $(call KernelPackage,ra))
|
||||
$(eval $(call KernelPackage,dns))
|
||||
$(eval $(call KernelPackage,pppoe_disc))
|
||||
$(eval $(call KernelPackage,l2pt))
|
||||
$(eval $(call KernelPackage,xtarp))
|
||||
$(eval $(call KernelPackage,xtip))
|
||||
$(eval $(call KernelPackage,xtip6))
|
||||
|
||||
@@ -27,7 +27,8 @@ define Package/ethmngr
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Ethernet status and configration utility
|
||||
DEPENDS:=+(TARGET_brcmbca||TARGET_airoha||TARGET_ipq95xx||TARGET_ipq53xx||TARGET_mediatek):libethernet +libuci +libubox +ubus +libpthread +libnl-genl +libeasy +libbbfdm-api
|
||||
DEPENDS:=+(TARGET_brcmbca||TARGET_airoha||TARGET_ipq95xx||TARGET_ipq53xx||TARGET_mediatek):libethernet +libuci +libubox +ubus +libpthread +libnl-genl +libeasy
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
endef
|
||||
|
||||
define Package/ethmngr/description
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=firewallmngr
|
||||
PKG_VERSION:=1.0.5
|
||||
PKG_VERSION:=1.0.6
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/firewallmngr.git
|
||||
PKG_SOURCE_VERSION:=94246676dc2e2db29b94fcffec1be3cee3ec8e9f
|
||||
PKG_SOURCE_VERSION:=2cac05871f7a8d93c144157c5f3f129deecf1a29
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -28,9 +28,10 @@ define Package/firewallmngr
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=Package to add Device.Firewall and Device.NAT. data model support.
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api +firewall
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +firewall
|
||||
DEPENDS+=+FIREWALLMNGR_PORT_TRIGGER:kmod-ipt-trigger +FIREWALLMNGR_PORT_TRIGGER:kmod-ip6t-trigger
|
||||
DEPENDS+=+FIREWALLMNGR_PORT_TRIGGER:iptables-mod-nfqueue
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
endef
|
||||
|
||||
define Package/firewallmngr/description
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=hostmngr
|
||||
PKG_VERSION:=1.2.6
|
||||
PKG_VERSION:=1.2.11
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=aa365710b227ba82b1c43f9cdf497261edb21852
|
||||
PKG_SOURCE_VERSION:=431b122a051a28a16b430c9dcc83d26f73030f79
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/hostmngr.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
@@ -31,9 +31,8 @@ define Package/hostmngr
|
||||
DEPENDS= +libubox +libuci +libubus +ubus +libeasy +libnl-genl \
|
||||
+libjson-c +libblobmsg-json +libnfnetlink +libmnl \
|
||||
+libnetfilter-conntrack \
|
||||
+HOSTMNGR_PLATFORM_HAS_WIFI:libwifi +libbbfdm-api \
|
||||
+libwifiutils
|
||||
|
||||
+HOSTMNGR_PLATFORM_HAS_WIFI:libwifi +libwifiutils
|
||||
DEPENDS+= +libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
endef
|
||||
|
||||
define Package/hostmngr/config
|
||||
|
||||
@@ -114,16 +114,16 @@ ip_rule_east_zone() {
|
||||
|
||||
add_access_rule() {
|
||||
local rule="$1"
|
||||
echo "iptables -w -A hosts_forward ${rule}" >> $ACL_FILE
|
||||
echo "ip6tables -w -A hosts_forward ${rule}" >> $ACL_FILE
|
||||
echo "iptables -w -A hosts_forward ${rule}" >> "$ACL_FILE"
|
||||
echo "ip6tables -w -A hosts_forward ${rule}" >> "$ACL_FILE"
|
||||
}
|
||||
|
||||
handle_day_list() {
|
||||
local value=$1
|
||||
|
||||
val=$(echo $value | cut -c 1-3)
|
||||
next_day_val=$(get_next_day $val)
|
||||
prev_day_val=$(get_previous_day $val)
|
||||
val=$(echo "$value" | cut -c 1-3)
|
||||
next_day_val=$(get_next_day "$val")
|
||||
prev_day_val=$(get_previous_day "$val")
|
||||
if [ -z $day ]; then
|
||||
day="$val"
|
||||
next_days="$next_day_val"
|
||||
@@ -137,8 +137,6 @@ handle_day_list() {
|
||||
|
||||
handle_schedule() {
|
||||
local schd_section="$1"
|
||||
local ac_section="$2"
|
||||
local acs_id
|
||||
local start_time
|
||||
local duration
|
||||
|
||||
@@ -148,11 +146,7 @@ handle_schedule() {
|
||||
next_days=""
|
||||
prev_days=""
|
||||
|
||||
config_get acs_id "$schd_section" "dm_parent"
|
||||
|
||||
if [ "$acs_id" != "$ac_section" ]; then
|
||||
return # schedule not for this access control section
|
||||
fi
|
||||
config_load schedules
|
||||
|
||||
local is_enabled
|
||||
config_get is_enabled "$schd_section" "enable" 0
|
||||
@@ -166,7 +160,7 @@ handle_schedule() {
|
||||
|
||||
IFS=" "
|
||||
for d in $day_config; do
|
||||
handle_day_list $d
|
||||
handle_day_list "$d"
|
||||
done
|
||||
|
||||
config_get start_time "$schd_section" "start_time" "00:00"
|
||||
@@ -174,8 +168,8 @@ handle_schedule() {
|
||||
|
||||
zone=$(date +%z | cut -c 1)
|
||||
local_start_time=$start_time
|
||||
hh=$(echo $local_start_time | awk -F: '{ print $1 }')
|
||||
mm=$(echo $local_start_time | awk -F: '{ print $2 }')
|
||||
hh=$(echo "$local_start_time" | awk -F: '{ print $1 }')
|
||||
mm=$(echo "$local_start_time" | awk -F: '{ print $2 }')
|
||||
hh_s=`expr $hh \* 3600`
|
||||
mm_s=`expr $mm \* 60`
|
||||
ss=$(( hh_s + mm_s ))
|
||||
@@ -197,12 +191,12 @@ handle_schedule() {
|
||||
|
||||
utc_start_time=$(date -u -d @$(date "+%s" -d "$local_start_time") +%H:%M)
|
||||
utc_stop_time=$(date -u -d @$(date "+%s" -d "$local_stop_time") +%H:%M)
|
||||
utc_start_hh=$(echo $utc_start_time | awk -F: '{ print $1 }')
|
||||
utc_stop_hh=$(echo $utc_stop_time | awk -F: '{ print $1 }')
|
||||
utc_start_hh=$(echo "$utc_start_time" | awk -F: '{ print $1 }')
|
||||
utc_stop_hh=$(echo "$utc_stop_time" | awk -F: '{ print $1 }')
|
||||
if [ "$zone" == "-" ]; then
|
||||
ip_rule_west_zone $utc_start_hh $utc_stop_hh $local_start_hh $local_stop_hh $utc_start_time $utc_stop_time
|
||||
ip_rule_west_zone "$utc_start_hh" "$utc_stop_hh" "$local_start_hh" "$local_stop_hh" "$utc_start_time" "$utc_stop_time"
|
||||
else
|
||||
ip_rule_east_zone $utc_start_hh $utc_stop_hh $local_start_hh $local_stop_hh $utc_start_time $utc_stop_time
|
||||
ip_rule_east_zone "$utc_start_hh" "$utc_stop_hh" "$local_start_hh" "$local_stop_hh" "$utc_start_time" "$utc_stop_time"
|
||||
fi
|
||||
|
||||
IP_RULE="$IP_RULE -j ACCEPT"
|
||||
@@ -258,7 +252,7 @@ handle_access_control() {
|
||||
schedule_added="0"
|
||||
# check if schedule is defined for this access_control instance
|
||||
# and if yes, create rule accordingly
|
||||
config_foreach handle_schedule ac_schedule "$ac_section"
|
||||
config_list_foreach "$ac_section" access_control_schedule handle_schedule
|
||||
|
||||
# for access rule to work, need to have default drop rule as last rule
|
||||
if [ "$schedule_added" == "1" ]; then
|
||||
|
||||
@@ -3,4 +3,8 @@ menu "Configuration"
|
||||
config ICWMP_MGMT_FROM_USP
|
||||
bool "Support configuration of ManagementServer from USP"
|
||||
default y
|
||||
|
||||
config ICWMP_BACKUP_EVENTS
|
||||
bool "Create backup of session events to persistent storage after each successful session"
|
||||
default y
|
||||
endmenu
|
||||
|
||||
@@ -8,14 +8,14 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=icwmp
|
||||
PKG_VERSION:=9.8.13
|
||||
PKG_VERSION:=9.8.24
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/icwmp.git
|
||||
PKG_SOURCE_VERSION:=14f3375ab8f1a586da7c9fd94c46bd16e3ae0ac6
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_SOURCE_VERSION:=868abeb86c2974b3647c7f66e085808c0f296721
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
@@ -31,7 +31,8 @@ define Package/icwmp
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=TR069 CWMP client
|
||||
DEPENDS:=+libuci +libubox +libblobmsg-json +libubus +libjson-c +libcurl +mxml +libuuid +libbbfdm-api +libopenssl
|
||||
DEPENDS:=+libuci +libubox +libblobmsg-json +libubus +libjson-c +libcurl +mxml +libuuid +libopenssl
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service +sysmngr
|
||||
MENU:=1
|
||||
endef
|
||||
|
||||
@@ -47,6 +48,10 @@ ifeq ($(CONFIG_ICWMP_MGMT_FROM_USP),y)
|
||||
EXTRA_CFLAGS += -DCWMP_DUAL_SUPPORT=BBFDM_BOTH
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ICWMP_BACKUP_EVENTS),y)
|
||||
EXTRA_CFLAGS += -DPERSIST_BACKUP_SESSION_EVENTS
|
||||
endif
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
$(CP) -rf ~/git/icwmp/* $(PKG_BUILD_DIR)/
|
||||
@@ -63,12 +68,12 @@ define Package/icwmp/install
|
||||
$(INSTALL_DIR) $(1)/etc/udhcpc.user.d
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/icwmpd $(1)/usr/sbin/icwmpd
|
||||
$(INSTALL_DATA) ./files/etc/config/cwmp $(1)/etc/config/cwmp
|
||||
$(INSTALL_BIN) ./files/etc/firewall.cwmp $(1)/etc/firewall.cwmp
|
||||
$(INSTALL_BIN) ./files/etc/critical_services.json $(1)/etc/icwmpd/critical_services.json
|
||||
$(INSTALL_BIN) ./files/etc/init.d/icwmpd $(1)/etc/init.d/icwmpd
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/85-cwmp-set-userid $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/90-cwmpfirewall $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/95-set-random-inform-time $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/icwmpd/vendor_log.sh $(1)/etc/icwmpd/vendor_log.sh
|
||||
$(INSTALL_BIN) ./files/etc/icwmpd/firewall.cwmp $(1)/etc/icwmpd/firewall.cwmp
|
||||
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/icwmp $(1)/lib/upgrade/keep.d/icwmp
|
||||
$(INSTALL_BIN) ./files/etc/udhcpc.user.d/udhcpc_icwmp_opt125.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt125.user
|
||||
$(INSTALL_BIN) ./files/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user
|
||||
|
||||
29
icwmp/files/etc/icwmpd/vendor_log.sh
Normal file
29
icwmp/files/etc/icwmpd/vendor_log.sh
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/bin/sh
|
||||
# This script handles '2 Vendor Log File' of Download RPC
|
||||
# Vendors can replace this file if they need to collect more logs
|
||||
|
||||
VENDOR_LOG_FILE="/tmp/icwmp/2_vendor_log"
|
||||
ret=""
|
||||
|
||||
if [ -n "$(which logread)" ]; then
|
||||
mkdir -p /tmp/icwmp
|
||||
|
||||
logread > "${VENDOR_LOG_FILE}"
|
||||
|
||||
arch_file="${VENDOR_LOG_FILE}.tar"
|
||||
|
||||
if [ -f "${arch_file}" ]; then
|
||||
rm -f ${arch_file}
|
||||
fi
|
||||
|
||||
if [ -f "${VENDOR_LOG_FILE}" ]; then
|
||||
tar -cf "${arch_file}" "${VENDOR_LOG_FILE}" 2> /dev/null
|
||||
if [ -f "${arch_file}" ]; then
|
||||
ret="${arch_file}"
|
||||
fi
|
||||
|
||||
rm -rf "${VENDOR_LOG_FILE}"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "${ret}"
|
||||
@@ -3,7 +3,7 @@
|
||||
uci -q batch <<-EOT
|
||||
delete firewall.cwmp
|
||||
set firewall.cwmp=include
|
||||
set firewall.cwmp.path=/etc/firewall.cwmp
|
||||
set firewall.cwmp.path=/etc/icwmpd/firewall.cwmp
|
||||
set firewall.cwmp.reload=1
|
||||
commit firewall
|
||||
EOT
|
||||
|
||||
@@ -21,6 +21,9 @@ config IEEE1905_WIFI_EASYMESH
|
||||
config IEEE1905_CMDU_FRAGMENT_TLV_BOUNDARY
|
||||
bool "Fragment large CMDU frame at TLV boundary instead of octet boundary"
|
||||
|
||||
config IEEE1905_BUILD_TR181_PLUGIN
|
||||
bool "Build TR-181 mapping module (responsible for Device.IEEE1905.)"
|
||||
|
||||
endmenu
|
||||
|
||||
endif
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ieee1905
|
||||
PKG_VERSION:=8.5.7
|
||||
PKG_VERSION:=8.6.1
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=171fa1b3886547765b2c223edfe195c26fcda28d
|
||||
PKG_SOURCE_VERSION:=5f7e6e30cbda36e431ecb7150d7494bce0c26f6f
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/ieee1905.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
@@ -48,7 +48,8 @@ define Package/ieee1905
|
||||
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
|
||||
+libjson-c +libblobmsg-json +ubus +libpthread \
|
||||
+libieee1905 +IEEE1905_PLATFORM_HAS_WIFI:libwifi \
|
||||
+libwifiutils +libbbfdm-api
|
||||
+libwifiutils
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
endef
|
||||
|
||||
include $(wildcard plugins/*.mk)
|
||||
@@ -96,6 +97,7 @@ TARGET_CFLAGS += -DEXTENSION_ALLOWED
|
||||
endif
|
||||
|
||||
TARGET_CFLAGS += -DHAS_UBUS
|
||||
TARGET_CFLAGS += -DBUILD_TR181_PLUGIN
|
||||
|
||||
MAKE_FLAGS += \
|
||||
extmod_subdirs="$(patsubst %,extensions/%,$(plugins))"
|
||||
|
||||
@@ -36,7 +36,7 @@ _iop()
|
||||
feeds_update genconfig \
|
||||
generate_tarballs install_key \
|
||||
scp_changes setup_host ssh_install_key status \
|
||||
update_feed_branches ssh_upgrade smoketest"
|
||||
ssh_upgrade smoketest"
|
||||
|
||||
if [ $COMP_CWORD -eq 1 ] ; then
|
||||
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
#!/bin/sh
|
||||
function license_report {
|
||||
LICDIR="/tmp/licenses-generator/"
|
||||
LICBIN="${LICDIR}/bin"
|
||||
|
||||
|
||||
dpkg -s python3 python3-requests python3-yaml python3-mako python3-six &> /dev/null
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
echo "Missing dependencies"
|
||||
sudo apt-get update
|
||||
sudo apt-get install python3 python3-requests python3-yaml python3-mako python3-six
|
||||
|
||||
else
|
||||
echo "Dependecy check passed"
|
||||
fi
|
||||
|
||||
|
||||
if [ -d "$LICDIR" ]; then
|
||||
### Take action if $DIR exists ###
|
||||
echo "Creating json licences file and html formated report"
|
||||
else
|
||||
### Control will jump here if $DIR does NOT exists ###
|
||||
echo "Error: licenses-generator not found. getting from iopsys repo"
|
||||
git clone git@dev.iopsys.eu:iopsys/licenses-generator.git $LICDIR
|
||||
fi
|
||||
LICGET=`${LICBIN}/licenses-generator gen-License bin/`
|
||||
echo $LICGET
|
||||
${LICBIN}/licenses-generator gen-licrprt $LICGET
|
||||
exit 0
|
||||
|
||||
}
|
||||
|
||||
|
||||
register_command "license_report" "Generate a Licence report on latest build in json format and html under reports"
|
||||
@@ -1,61 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Exported interface
|
||||
function update_feed_branches {
|
||||
local release="$1"
|
||||
local ipath="$(pwd)"
|
||||
local branch="$2"
|
||||
local curbranch
|
||||
|
||||
[ -n "$release" ] || {
|
||||
echo "Usage: ./update_feeds <RELEASE> <BRANCH>"
|
||||
echo ""
|
||||
echo "If you do not give a branch as argument,"
|
||||
echo "<RELEASE> branch will be updated to commit"
|
||||
echo "hash given in feeds.conf for each feed repo"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [ -n "$branch" ]; then
|
||||
echo "Updating release branch $release to specific commit hash given in feeds.conf for each feed repo at branch $branch"
|
||||
if git diff-index --quiet HEAD; then
|
||||
curbranch=`git symbolic-ref HEAD 2>/dev/null`
|
||||
curbranch=${curbranch##refs/heads/}
|
||||
if [ -z $curbranch ]; then
|
||||
curbranch=`git log -1 --pretty=format:"%H"`
|
||||
fi
|
||||
git checkout $branch || {
|
||||
echo "couldn't checkout branch $branch"
|
||||
exit 99
|
||||
}
|
||||
else
|
||||
echo "You have unsaved changes."
|
||||
exit 99
|
||||
fi
|
||||
else
|
||||
echo "Updating release branch $release to specific commit hash given in feeds.conf for each feed repo"
|
||||
fi
|
||||
|
||||
ifeeds="$(grep -r 'dev.iopsys.eu' feeds.conf | awk '{print$2}' | tr '\n' ' ')"
|
||||
|
||||
for f in $ifeeds; do
|
||||
commith=$(grep $f feeds.conf | cut -d'^' -f2)
|
||||
cd $ipath/feeds/$f
|
||||
git branch -D $release 2>/dev/null
|
||||
echo "$f: updating release branch $release to commit $commith"
|
||||
git checkout $commith
|
||||
git push origin :$release
|
||||
git checkout -b $release
|
||||
git push --set-upstream origin $release
|
||||
cd $ipath
|
||||
done
|
||||
|
||||
if [ -n "$branch" ]; then
|
||||
echo "Release branch $release is updated to specific commit hash given in feeds.conf in in branch $branch for each feed repo"
|
||||
git checkout $curbranch
|
||||
else
|
||||
echo "Release branch $release is updated to specific commit hash given in feeds.conf for each feed repo"
|
||||
fi
|
||||
}
|
||||
|
||||
register_command "update_feed_branches" "<release> [branch] Update branches in feeds from the current top level commit or specified top level branch"
|
||||
@@ -4,7 +4,7 @@ PKG_NAME:=iopsys-analytics
|
||||
PKG_RELEASE:=$(COMMITCOUNT)
|
||||
PKG_LICENSE:=PROPRIETARY
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=f448cfe9264b4079f616b065244c4be24b516aba
|
||||
PKG_SOURCE_VERSION:=00189cea0a78b7a30dbfdd363b6d8e836437d1bc
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/iopsys-analytics.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
@@ -36,7 +36,7 @@ define Package/$(PKG_NAME)
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=IOPSYS libvoice for Airoha platform
|
||||
URL:=
|
||||
DEPENDS:=+voip_app
|
||||
DEPENDS:=
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
|
||||
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libvoice-broadcom
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=1.0.14
|
||||
PKG_VERSION:=1.0.15
|
||||
PKG_LICENSE:=PROPRIETARY
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
@@ -17,7 +17,7 @@ LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/$(PKG_NAME).git
|
||||
PKG_SOURCE_VERSION:=7fde62b9634c63b9bc71d1c20541798971a78dc8
|
||||
PKG_SOURCE_VERSION:=baf5ebfb45404714bbfcc3068080f93265934d8a
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libwifi
|
||||
PKG_VERSION:=7.6.3
|
||||
PKG_VERSION:=7.7.8
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=34d9fca18002b08f135805c7bc3cb00024943784
|
||||
PKG_SOURCE_VERSION:=b12d933e1cdd3b84eefbb45b0ecf2d1927f5d5dc
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libwifi.git
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
@@ -43,6 +43,9 @@ else ifeq ($(CONFIG_TARGET_airoha),y)
|
||||
TARGET_PLATFORM=ECONET
|
||||
TARGET_WIFI_TYPE=MEDIATEK MAC80211
|
||||
TARGET_CFLAGS +=-DIOPSYS_ECONET
|
||||
ifeq ($(CONFIG_TARGET_airoha_an7581),y)
|
||||
TARGET_CFLAGS +=-DCONFIG_MTK
|
||||
endif
|
||||
else ifeq ($(CONFIG_TARGET_ipq95xx),y)
|
||||
TARGET_PLATFORM=IPQ95XX
|
||||
TARGET_WIFI_TYPE=QUALCOMM MAC80211
|
||||
@@ -72,6 +75,10 @@ ifeq ($(CONFIG_LIBWIFI_USE_CTRL_IFACE),y)
|
||||
TARGET_CFLAGS +=-DLIBWIFI_USE_CTRL_IFACE
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LIBWIFI_SKIP_PROBES),y)
|
||||
TARGET_CFLAGS +=-DLIBWIFI_BRCM_SKIP_PROBES
|
||||
endif
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-I$(STAGING_DIR)/usr/include/openssl \
|
||||
@@ -140,6 +147,11 @@ define Package/libwifi/config
|
||||
config LIBWIFI_USE_CTRL_IFACE
|
||||
bool "Create UNIX sockets to interface with hostapd/wpa_supplicant"
|
||||
default y
|
||||
|
||||
config LIBWIFI_SKIP_PROBES
|
||||
bool "Don't create probe-req events"
|
||||
default y
|
||||
|
||||
endif
|
||||
endef
|
||||
|
||||
|
||||
@@ -17,10 +17,18 @@ config LOGMNGR_BACKEND_SYSLOG_NG
|
||||
Enable this option to use syslog-ng for log management.
|
||||
|
||||
endchoice
|
||||
|
||||
config LOGMNGR_LOGROTATE
|
||||
bool "Logrotate support"
|
||||
depends on PACKAGE_logmngr
|
||||
default y
|
||||
help
|
||||
It adds support for logrotate functionality.
|
||||
|
||||
config LOGMNGR_VENDOR_LOG_FILE
|
||||
bool "Enable Device.DeviceInfo.VendorLogFile. Object"
|
||||
depends on PACKAGE_logmngr
|
||||
default y
|
||||
help
|
||||
It adds support for Device.DeviceInfo.VendorLogFile. Object.
|
||||
endif
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=logmngr
|
||||
PKG_VERSION:=1.0.1
|
||||
PKG_VERSION:=1.0.6
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/system/logmngr.git
|
||||
PKG_SOURCE_VERSION:=ec10abb3cc0f3b96eb806c9c67e18d9d134287e9
|
||||
PKG_SOURCE_VERSION:=37f9eef6ad92ab4835893c6c8ee65338917071b6
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -27,8 +27,9 @@ define Package/logmngr
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Logging Manager
|
||||
DEPENDS:=+libbbfdm-api +LOGMNGR_BACKEND_FLUENTBIT:fluent-bit +LOGMNGR_LOGROTATE:logrotate
|
||||
DEPENDS:=+LOGMNGR_BACKEND_FLUENTBIT:fluent-bit +LOGMNGR_LOGROTATE:logrotate
|
||||
DEPENDS+=+LOGMNGR_BACKEND_SYSLOG_NG:syslog-ng
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
endef
|
||||
|
||||
define Package/logmngr/description
|
||||
@@ -51,23 +52,26 @@ define Package/logmngr/install
|
||||
$(INSTALL_BIN) ./files/logmngr.init $(1)/etc/init.d/logmngr
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) ./files/logread $(1)/usr/sbin
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) ./files/10-logmngr_config_generate $(1)/etc/uci-defaults/
|
||||
|
||||
$(INSTALL_DIR) $(1)/lib/logmngr
|
||||
ifeq ($(CONFIG_LOGMNGR_BACKEND_FLUENTBIT),y)
|
||||
$(INSTALL_DATA) ./files/lib/logmngr/fluent-bit.sh $(1)/lib/logmngr/.
|
||||
$(INSTALL_DATA) ./files/lib/logmngr/fluent-bit.sh $(1)/lib/logmngr/
|
||||
$(INSTALL_BIN) ./files/logread $(1)/usr/sbin
|
||||
endif
|
||||
ifeq ($(CONFIG_LOGMNGR_BACKEND_SYSLOG_NG),y)
|
||||
$(INSTALL_DATA) ./files/lib/logmngr/syslog-ng.sh $(1)/lib/logmngr/.
|
||||
$(INSTALL_DATA) ./files/lib/logmngr/syslog-ng.sh $(1)/lib/logmngr/
|
||||
endif
|
||||
$(BBFDM_INSTALL_CORE_PLUGIN) $(PKG_BUILD_DIR)/bbf_plugin/libbbfsyslog.so $(1)
|
||||
ifeq ($(CONFIG_LOGMNGR_LOGROTATE),y)
|
||||
$(INSTALL_BIN) ./files/11-logmngr_logrotate_config_generate $(1)/etc/uci-defaults/
|
||||
$(INSTALL_DATA) ./files/lib/logmngr/logrotate.sh $(1)/lib/logmngr/.
|
||||
$(BBFDM_INSTALL_CORE_PLUGIN) $(PKG_BUILD_DIR)/bbf_plugin/libbbflogrotate.so $(1)
|
||||
$(INSTALL_DATA) ./files/lib/logmngr/logrotate.sh $(1)/lib/logmngr/
|
||||
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/bbf_plugin/libbbflogrotate.so $(1) sysmngr
|
||||
endif
|
||||
ifeq ($(CONFIG_LOGMNGR_VENDOR_LOG_FILE),y)
|
||||
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/bbf_plugin/libbbfvendorlog.so $(1) sysmngr
|
||||
endif
|
||||
endef
|
||||
|
||||
|
||||
@@ -20,4 +20,9 @@ uci set logmngr.lf1=log_file
|
||||
uci set logmngr.lf1.enable=1
|
||||
uci set logmngr.lf1.action="ac1"
|
||||
uci set logmngr.lf1.file="/var/log/messages"
|
||||
|
||||
uci set logmngr.lr1=log_remote
|
||||
uci set logmngr.lr1.enable=0
|
||||
uci set logmngr.lr1.action="ac1"
|
||||
uci set logmngr.lr1.port="514"
|
||||
uci commit logmngr
|
||||
|
||||
@@ -60,10 +60,12 @@ handle_logrotate() {
|
||||
local compression
|
||||
config_get compression $section compression
|
||||
if [ -n "$compression" ]; then
|
||||
cmd=$(echo "$compression" | awk '{print tolower($0)}')
|
||||
echo -e "\tcompress" >> ${LOGROTATE_TMP_FILE}
|
||||
echo -e "\tcompresscmd $compression" >> ${LOGROTATE_TMP_FILE}
|
||||
echo -e "\tcompresscmd $cmd" >> ${LOGROTATE_TMP_FILE}
|
||||
fi
|
||||
|
||||
echo -e "\taddextension _logrotate" >> ${LOGROTATE_TMP_FILE}
|
||||
echo -e "\tpostrotate" >> ${LOGROTATE_TMP_FILE}
|
||||
echo -e "\t\tservice logmngr restart" >> ${LOGROTATE_TMP_FILE}
|
||||
echo -e "\t\tsleep 1" >> ${LOGROTATE_TMP_FILE}
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=map-agent
|
||||
PKG_VERSION:=6.2.1.0
|
||||
PKG_VERSION:=6.2.2.2
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=f02e84b263659cf1cdd377597f976abe151bc5cd
|
||||
PKG_SOURCE_VERSION:=8554576cc8a68b89faba1b13a7be0386325da26a
|
||||
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
generate_mapagent_config=0
|
||||
generate_wireless_sta_config=0
|
||||
generate_aps_config=1
|
||||
|
||||
network_mode="$(fw_printenv -n netmode)" # default is layer3
|
||||
multiap_mode="$(fw_printenv -n multiap_mode)" # default is full
|
||||
@@ -65,10 +66,40 @@ generate_multiap_config() {
|
||||
|
||||
device="$dev"
|
||||
|
||||
ifprefix_radio=""
|
||||
if is_airoha; then
|
||||
ifprefix="wlan%_%"
|
||||
ifname="wlan${devidx}_0"
|
||||
ifname_bh="wlan${devidx}_1"
|
||||
if [ -d "/sys/module/mt76" ]; then
|
||||
ifprefix="wlan%_%"
|
||||
ifname="wlan${devidx}_0"
|
||||
ifname_bh="wlan${devidx}_1"
|
||||
else
|
||||
ifname_sta=""
|
||||
case "$band" in
|
||||
2g)
|
||||
ifprefix="ra%"
|
||||
ifname="ra0"
|
||||
ifname_bh="ra1"
|
||||
ifname_sta="apcli0"
|
||||
;;
|
||||
5g)
|
||||
ifprefix="rai%"
|
||||
ifname="rai0"
|
||||
ifname_bh="rai1"
|
||||
ifname_sta="apclii0"
|
||||
;;
|
||||
6g)
|
||||
ifprefix="rax%"
|
||||
ifname="rax0"
|
||||
ifname_bh="rax1"
|
||||
ifname_sta="apclix0"
|
||||
;;
|
||||
esac
|
||||
ifprefix_radio="${ifprefix}"
|
||||
if [ "${network_mode}" == "extender" ]; then
|
||||
ifname="${ifname_sta}"
|
||||
fi
|
||||
fi
|
||||
|
||||
uci set wireless.$dev.channels="$channels"
|
||||
uci commit wireless
|
||||
elif is_broadcom; then
|
||||
@@ -91,6 +122,9 @@ generate_multiap_config() {
|
||||
# Disable for MLD/MLO
|
||||
uci set mapagent.agent.island_prevention="0"
|
||||
uci commit mapagent
|
||||
|
||||
# wait ap-autoconfiguration
|
||||
generate_aps_config=0
|
||||
}
|
||||
else
|
||||
ifprefix="wlan%-"
|
||||
@@ -99,12 +133,17 @@ generate_multiap_config() {
|
||||
fi
|
||||
|
||||
if [ $generate_mapagent_config -eq 1 ]; then
|
||||
uci set mapagent.agent.ifprefix="$ifprefix"
|
||||
if [ -z "${ifprefix_radio}" ]; then
|
||||
uci set mapagent.agent.ifprefix="$ifprefix"
|
||||
fi
|
||||
uci set mapagent.agent.brcm_setup="$brcm_setup"
|
||||
uci set mapagent.agent.ap_follow_sta_dfs="$ap_follow_sta_dfs"
|
||||
uci add mapagent radio
|
||||
uci set mapagent.@radio[-1].device="$device"
|
||||
uci set mapagent.@radio[-1].band="$mode_band"
|
||||
if [ -n "${ifprefix_radio}" ]; then
|
||||
uci set mapagent.@radio[-1].ifprefix="${ifprefix}"
|
||||
fi
|
||||
|
||||
if [ "$network_mode" == "extender" ]; then
|
||||
uci add mapagent bsta
|
||||
@@ -136,22 +175,24 @@ generate_multiap_config() {
|
||||
\"match\":{\"mode\":\"sta\", \"ifname\":\"$ifname\", \"device\":\"$device\"},\"values\":{\"multi_ap\":\"1\"}}" 2>/dev/null
|
||||
fi
|
||||
else
|
||||
uci add mapagent ap
|
||||
uci set mapagent.@ap[-1].type="fronthaul"
|
||||
uci set mapagent.@ap[-1].device="$device"
|
||||
uci set mapagent.@ap[-1].ifname="$ifname"
|
||||
uci set mapagent.@ap[-1].band="$mode_band"
|
||||
uci add mapagent ap
|
||||
uci set mapagent.@ap[-1].type="backhaul"
|
||||
uci set mapagent.@ap[-1].device="$device"
|
||||
uci set mapagent.@ap[-1].ifname="$ifname_bh"
|
||||
uci set mapagent.@ap[-1].band="$mode_band"
|
||||
if [ $generate_aps_config -eq 1 ]; then
|
||||
uci add mapagent ap
|
||||
uci set mapagent.@ap[-1].type="fronthaul"
|
||||
uci set mapagent.@ap[-1].device="$device"
|
||||
uci set mapagent.@ap[-1].ifname="$ifname"
|
||||
uci set mapagent.@ap[-1].band="$mode_band"
|
||||
uci add mapagent ap
|
||||
uci set mapagent.@ap[-1].type="backhaul"
|
||||
uci set mapagent.@ap[-1].device="$device"
|
||||
uci set mapagent.@ap[-1].ifname="$ifname_bh"
|
||||
uci set mapagent.@ap[-1].band="$mode_band"
|
||||
|
||||
if [ "$multiap_mode" != "none" ]; then
|
||||
ubus call uci set "{\"config\":\"wireless\",\"type\":\"wifi-iface\", \
|
||||
\"match\":{\"ifname\":\"$ifname\", \"device\":\"$device\"},\"values\":{\"multi_ap\":\"2\"}}" 2>/dev/null
|
||||
ubus call uci set "{\"config\":\"wireless\",\"type\":\"wifi-iface\", \
|
||||
\"match\":{\"ifname\":\"$ifname_bh\", \"device\":\"$device\"},\"values\":{\"multi_ap\":\"1\"}}" 2>/dev/null
|
||||
if [ "$multiap_mode" != "none" ]; then
|
||||
ubus call uci set "{\"config\":\"wireless\",\"type\":\"wifi-iface\", \
|
||||
\"match\":{\"ifname\":\"$ifname\", \"device\":\"$device\"},\"values\":{\"multi_ap\":\"2\"}}" 2>/dev/null
|
||||
ubus call uci set "{\"config\":\"wireless\",\"type\":\"wifi-iface\", \
|
||||
\"match\":{\"ifname\":\"$ifname_bh\", \"device\":\"$device\"},\"values\":{\"multi_ap\":\"1\"}}" 2>/dev/null
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=map-controller
|
||||
PKG_VERSION:=6.1.2.1
|
||||
PKG_VERSION:=6.1.2.9
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=3251215d020cb27ab86504d847b3b45900582b57
|
||||
PKG_SOURCE_VERSION:=94b30d021b13e9488f9c76e7ceece48c9a567321
|
||||
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
|
||||
|
||||
LOCAL_DEV=0
|
||||
|
||||
@@ -6,14 +6,14 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=mcastmngr
|
||||
PKG_VERSION:=1.2.5
|
||||
PKG_VERSION:=1.2.7
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/mcastmngr.git
|
||||
PKG_SOURCE_VERSION:=7e114a0313a61f967324ac9f89cacafdbffe74aa
|
||||
PKG_SOURCE_VERSION:=275d7e5448333e53f8bc980344b39f7f577d4664
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -29,7 +29,8 @@ MAKE_PATH:=bbf_plugin
|
||||
define Package/mcastmngr
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Multicast Proxy/Snooping Manager
|
||||
DEPENDS:=+!TARGET_brcmbca:mcproxy +libuci +libubox +libubus +libblobmsg-json +libbbfdm-api
|
||||
DEPENDS:=+!TARGET_brcmbca:mcproxy +libuci +libubox +libubus +libblobmsg-json
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
endef
|
||||
|
||||
define Package/mcastmngr/description
|
||||
|
||||
@@ -39,7 +39,6 @@ config_snooping_upstream_interface() {
|
||||
local snooping_upstream_intf=""
|
||||
|
||||
json_load "$(devstatus $1)"
|
||||
logger -t "mcastconf" "$(devstatus $1)"
|
||||
itr=1
|
||||
json_select bridge-members
|
||||
|
||||
|
||||
@@ -3,8 +3,42 @@
|
||||
. /usr/share/libubox/jshn.sh
|
||||
. /lib/functions.sh
|
||||
|
||||
read_mcast_stats() {
|
||||
cat /proc/net/igmp_snooping > /tmp/igmp_stats
|
||||
readonly TEMPFILE="/tmp/snooping_stats_"$$
|
||||
|
||||
splitup_ipv6addr() {
|
||||
local inaddr="$1"
|
||||
local lowaddr=""
|
||||
local hiaddr=""
|
||||
local subaddr=""
|
||||
local outaddr=""
|
||||
|
||||
OIFS=$IFS
|
||||
IFS=":"
|
||||
for subaddr in $inaddr; do
|
||||
loaddr="$(printf "%x\n" 0x$(echo -n "$subaddr" | cut -b5-8))"
|
||||
hiaddr="$(printf "%x\n" 0x$(echo -n "$subaddr" | cut -b1-4))"
|
||||
if [ -z "$outaddr" ]; then
|
||||
outaddr="${hiaddr}:${loaddr}"
|
||||
else
|
||||
outaddr="${outaddr}:${hiaddr}:${loaddr}"
|
||||
fi
|
||||
done
|
||||
IFS=$OIFS
|
||||
|
||||
echo "$outaddr" | sed -e 's/0000/0/g' -e 's/00/0/g' -e 's/000/0/g'
|
||||
}
|
||||
|
||||
meld_files() {
|
||||
local type="$1"
|
||||
|
||||
if [ "$type" = "mld" ]; then
|
||||
cat "/proc/net/${type}_snooping" | awk -F' ' '{ print $1 " " $2 " " $3 " " $4 " " $5 " " $6 " " $7 " " $8 " NULL " $9 " " $10 " " $11 " " $12 " " $13 " " $12 }' >> "$TEMPFILE"
|
||||
else
|
||||
cat "/proc/net/${type}_snooping" >> "$TEMPFILE"
|
||||
fi
|
||||
}
|
||||
|
||||
read_snooping_file() {
|
||||
local mcast_addrs=""
|
||||
local ifaces=""
|
||||
|
||||
@@ -33,7 +67,7 @@ read_mcast_stats() {
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done < /tmp/igmp_stats
|
||||
done < "$TEMPFILE"
|
||||
|
||||
while read line; do
|
||||
# reading each line
|
||||
@@ -41,6 +75,7 @@ read_mcast_stats() {
|
||||
br-*)
|
||||
found_ip=0
|
||||
grp_ip="$(echo $line | awk -F ' ' '{ print $10 }')"
|
||||
|
||||
if [ -z "$mcast_addrs" ]; then
|
||||
mcast_addrs="$grp_ip"
|
||||
continue
|
||||
@@ -60,10 +95,8 @@ read_mcast_stats() {
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done < /tmp/igmp_stats
|
||||
done < "$TEMPFILE"
|
||||
|
||||
json_init
|
||||
json_add_array "snooping"
|
||||
IFS=" "
|
||||
for intf in $ifaces; do
|
||||
json_add_object ""
|
||||
@@ -86,7 +119,12 @@ read_mcast_stats() {
|
||||
fi
|
||||
if [ $grp_obj_added -eq 0 ]; then
|
||||
json_add_object ""
|
||||
gip="$(ipcalc.sh $gip_addr | grep IP | awk '{print substr($0,4)}')"
|
||||
if [ -n "$(echo $gip_addr | grep -oE "^((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])$")" ]; then
|
||||
gip="$(ipcalc.sh $gip_addr | grep IP | awk '{print substr($0,4)}')"
|
||||
else
|
||||
gip_addr=$(splitup_ipv6addr "$gip_addr")
|
||||
gip="$(echo $gip_addr | grep -oE '^([0-9a-fA-F]{0,4}:){1,7}[0-9a-fA-F]{0,4}$')"
|
||||
fi
|
||||
json_add_string "groupaddr" "$gip"
|
||||
json_add_array "clients"
|
||||
grp_obj_added=1
|
||||
@@ -94,7 +132,12 @@ read_mcast_stats() {
|
||||
|
||||
json_add_object ""
|
||||
host_ip="$(echo $line | awk -F ' ' '{ print $14 }')"
|
||||
h_ip="$(ipcalc.sh $host_ip | grep IP | awk '{print substr($0,4)}')"
|
||||
if [ -n "$(echo $host_ip | grep -oE "^((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])$")" ]; then
|
||||
h_ip="$(ipcalc.sh $host_ip | grep IP | awk '{print substr($0,4)}')"
|
||||
else
|
||||
host_ip=$(splitup_ipv6addr "$host_ip")
|
||||
h_ip="$(echo $host_ip | grep -oE '^([0-9a-fA-F]{0,4}:){1,7}[0-9a-fA-F]{0,4}$')"
|
||||
fi
|
||||
json_add_string "ipaddr" "$h_ip"
|
||||
src_port="$(echo $line | awk -F ' ' '{ print $2 }')"
|
||||
json_add_string "device" "$src_port"
|
||||
@@ -103,7 +146,7 @@ read_mcast_stats() {
|
||||
json_close_object #close the associated device object
|
||||
;;
|
||||
esac
|
||||
done < /tmp/igmp_stats
|
||||
done < "$TEMPFILE"
|
||||
if [ $grp_obj_added -eq 1 ]; then
|
||||
json_close_array #close the associated devices array
|
||||
json_close_object # close the groups object
|
||||
@@ -112,10 +155,20 @@ read_mcast_stats() {
|
||||
json_close_array #close the groups array
|
||||
json_close_object # close the snooping object
|
||||
done # close the loop for interfaces
|
||||
}
|
||||
|
||||
read_mcast_stats() {
|
||||
echo -n > "$TEMPFILE"
|
||||
|
||||
json_init
|
||||
json_add_array "snooping"
|
||||
meld_files "igmp"
|
||||
meld_files "mld"
|
||||
read_snooping_file
|
||||
json_close_array # close the snooping array
|
||||
json_dump
|
||||
|
||||
rm -f /tmp/igmp_stats
|
||||
rm -f "$TEMPFILE"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
@@ -129,7 +182,7 @@ case "$1" in
|
||||
if [ -z "${out}" ]; then
|
||||
echo '{}'
|
||||
else
|
||||
echo ${out}
|
||||
echo "${out}"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -35,15 +35,14 @@ start_service() {
|
||||
|
||||
if [ -z "${PROG_PARAMS}" ]; then
|
||||
start_mcast_service
|
||||
return
|
||||
else
|
||||
local prev_IFS="${IFS}"
|
||||
IFS=${PROG_PARAMS_SEPARATOR}
|
||||
for param in ${PROG_PARAMS}; do
|
||||
IFS="${prev_IFS}"
|
||||
start_mcast_service ${param}
|
||||
done
|
||||
fi
|
||||
|
||||
local prev_IFS="${IFS}"
|
||||
IFS=${PROG_PARAMS_SEPARATOR}
|
||||
for param in ${PROG_PARAMS}; do
|
||||
IFS="${prev_IFS}"
|
||||
start_mcast_service ${param}
|
||||
done
|
||||
}
|
||||
|
||||
boot() {
|
||||
|
||||
@@ -394,13 +394,15 @@ config_mcproxy() {
|
||||
disable_snooping
|
||||
if [ "$igmp_p_enable" == "1" ]; then
|
||||
config_mcproxy_instance igmp "$igmp_p_version"
|
||||
elif [ "$igmp_s_enable" == "1" ]; then
|
||||
fi
|
||||
if [ "$igmp_s_enable" == "1" ]; then
|
||||
config_snooping igmp "$igmp_s_version"
|
||||
fi
|
||||
|
||||
if [ "$mld_p_enable" == "1" ]; then
|
||||
config_mcproxy_instance mld "$mld_p_version"
|
||||
elif [ "$mld_s_enable" == "1" ]; then
|
||||
fi
|
||||
if [ "$mld_s_enable" == "1" ]; then
|
||||
config_snooping mld "$mld_s_version"
|
||||
fi
|
||||
}
|
||||
@@ -415,8 +417,4 @@ configure_mcast() {
|
||||
read_mcast_snooping_params
|
||||
read_mcast_proxy_params
|
||||
config_mcproxy
|
||||
|
||||
if [ -z "${PROG_PARAMS}" ]; then
|
||||
exit 0
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -3,12 +3,46 @@
|
||||
. /usr/share/libubox/jshn.sh
|
||||
. /lib/functions.sh
|
||||
|
||||
read_mcast_stats() {
|
||||
local temp_igmp_file='/tmp/igmp_stats_'$$
|
||||
local snooping_stats='/tmp/igmp_snooping_stats'
|
||||
readonly TEMPFILE="/tmp/snooping_stats_"$$
|
||||
|
||||
mcast_snooping_interface() {
|
||||
local interface intf gip vid port
|
||||
|
||||
config_get interface "$1" interface
|
||||
|
||||
for intf in $interface; do
|
||||
[ -z "$(bridge mdb show dev "$intf" 2> /dev/null | grep -v -F "port ${intf} " | xargs)" ] && continue
|
||||
json_add_object ""
|
||||
json_add_string "interface" "$intf"
|
||||
json_add_array "groups"
|
||||
for gip in $(bridge mdb show dev "$intf" | grep -v -F "port ${intf} " | cut -f6 -d' ' | sort -u | xargs); do
|
||||
json_add_object ""
|
||||
json_add_string "groupaddr" "$gip"
|
||||
json_add_array "clients"
|
||||
for port in $(bridge mdb show dev "$intf" | grep -v -F "port ${intf} " | grep -F "grp ${gip} " | cut -f4 -d' ' | sort -u | xargs); do
|
||||
json_add_object ""
|
||||
json_add_string "device" "$port"
|
||||
for vid in $(bridge mdb show dev "$intf" | grep -F "port ${port} grp ${gip} " | grep -F ' vid ' | cut -f9 -d' ' | sort -u | xargs); do
|
||||
json_add_object ""
|
||||
json_add_string "vid" "$vid"
|
||||
json_close_object #close the associated vid object
|
||||
done
|
||||
json_close_object #close the associated device object
|
||||
done
|
||||
json_close_array #close the associated devices array
|
||||
json_close_object # close the groups object
|
||||
done # close the loop for group addresses
|
||||
json_close_array #close the groups array
|
||||
json_close_object # close the snooping object
|
||||
done # close the loop for interfaces
|
||||
}
|
||||
|
||||
meld_files() {
|
||||
local type="$1"
|
||||
local snooping_stats="/tmp/${type}_snooping_stats"
|
||||
local old_mod_time=$(date +%s 2>/dev/null -r "$snooping_stats")
|
||||
|
||||
# Sending signal to mcproxy to dump multicast data in /tmp/igmp_snooping_stats
|
||||
# Sending signal to mcproxy to dump multicast data in /tmp/${type}_snooping_stats
|
||||
local mcast_pids=$(pidof mcproxy)
|
||||
for pid in $mcast_pids
|
||||
do
|
||||
@@ -24,8 +58,11 @@ read_mcast_stats() {
|
||||
done
|
||||
fi
|
||||
|
||||
cat "$snooping_stats" > "$temp_igmp_file"
|
||||
[ ! -e "$snooping_stats" ] && return 0
|
||||
cat "$snooping_stats" >> "$TEMPFILE"
|
||||
}
|
||||
|
||||
read_snooping_file() {
|
||||
local mcast_addrs=""
|
||||
local ifaces=""
|
||||
|
||||
@@ -54,7 +91,7 @@ read_mcast_stats() {
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done < "$temp_igmp_file"
|
||||
done < "$TEMPFILE"
|
||||
|
||||
while read line; do
|
||||
# reading each line
|
||||
@@ -81,10 +118,8 @@ read_mcast_stats() {
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
done < "$temp_igmp_file"
|
||||
done < "$TEMPFILE"
|
||||
|
||||
json_init
|
||||
json_add_array "snooping"
|
||||
IFS=" "
|
||||
for intf in $ifaces; do
|
||||
json_add_object ""
|
||||
@@ -107,7 +142,11 @@ read_mcast_stats() {
|
||||
fi
|
||||
if [ $grp_obj_added -eq 0 ]; then
|
||||
json_add_object ""
|
||||
gip="$(ipcalc.sh $gip_addr | grep IP | awk '{print substr($0,4)}')"
|
||||
if [ -n "$(echo $gip_addr | grep -oE "^((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])$")" ]; then
|
||||
gip="$(ipcalc.sh $gip_addr | grep IP | awk '{print substr($0,4)}')"
|
||||
else
|
||||
gip="$(echo $gip_addr | grep -oE '^([0-9a-fA-F]{0,4}:){1,7}[0-9a-fA-F]{0,4}$')"
|
||||
fi
|
||||
json_add_string "groupaddr" "$gip"
|
||||
json_add_array "clients"
|
||||
grp_obj_added=1
|
||||
@@ -115,7 +154,11 @@ read_mcast_stats() {
|
||||
|
||||
json_add_object ""
|
||||
host_ip="$(echo $line | awk -F ' ' '{ print $3 }')"
|
||||
h_ip="$(ipcalc.sh $host_ip | grep IP | awk '{print substr($0,4)}')"
|
||||
if [ -n "$(echo $host_ip | grep -oE "^((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])$")" ]; then
|
||||
h_ip="$(ipcalc.sh $host_ip | grep IP | awk '{print substr($0,4)}')"
|
||||
else
|
||||
h_ip="$(echo $host_ip | grep -oE '^([0-9a-fA-F]{0,4}:){1,7}[0-9a-fA-F]{0,4}$')"
|
||||
fi
|
||||
json_add_string "ipaddr" "$h_ip"
|
||||
src_port="$(echo $line | awk -F ' ' '{ print $4 }')"
|
||||
json_add_string "device" "$src_port"
|
||||
@@ -124,7 +167,7 @@ read_mcast_stats() {
|
||||
json_close_object #close the associated device object
|
||||
;;
|
||||
esac
|
||||
done < "$temp_igmp_file"
|
||||
done < "$TEMPFILE"
|
||||
if [ $grp_obj_added -eq 1 ]; then
|
||||
json_close_array #close the associated devices array
|
||||
json_close_object # close the groups object
|
||||
@@ -133,10 +176,23 @@ read_mcast_stats() {
|
||||
json_close_array #close the groups array
|
||||
json_close_object # close the snooping object
|
||||
done # close the loop for interfaces
|
||||
}
|
||||
|
||||
read_mcast_stats() {
|
||||
echo -n > "$TEMPFILE"
|
||||
|
||||
json_init
|
||||
json_add_array "snooping"
|
||||
meld_files "igmp"
|
||||
meld_files "mld"
|
||||
read_snooping_file
|
||||
# L2 Snooping goes here
|
||||
config_load mcast
|
||||
config_foreach mcast_snooping_interface "snooping"
|
||||
json_close_array # close the snooping array
|
||||
json_dump
|
||||
|
||||
rm -f "$temp_igmp_file"
|
||||
rm -f "$TEMPFILE"
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=netmngr
|
||||
PKG_VERSION:=1.0.4
|
||||
PKG_VERSION:=1.0.7
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/netmngr.git
|
||||
PKG_SOURCE_VERSION:=ad4825bc6349d1cd68680aaaa6c5b217227c90fe
|
||||
PKG_SOURCE_VERSION:=539c23695a086fd3d628da7b0f0de764726cfa09
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -25,7 +25,8 @@ include ../bbfdm/bbfdm.mk
|
||||
define Package/netmngr
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Network Data Model Support
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libbbfdm-api
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
endef
|
||||
|
||||
define Package/netmngr/description
|
||||
@@ -34,7 +35,7 @@ endef
|
||||
|
||||
MAKE_PATH:=src
|
||||
|
||||
TARGET_CFLAGS += -DBBF_VENDOR_PREFIX=$(CONFIG_BBF_VENDOR_PREFIX)
|
||||
TARGET_CFLAGS += -DBBF_VENDOR_PREFIX=\\\"$(CONFIG_BBF_VENDOR_PREFIX)\\\"
|
||||
|
||||
define Package/netmngr/install
|
||||
$(BBFDM_INSTALL_MS_DM) -u Network $(PKG_BUILD_DIR)/src/libnetmngr.so $(1) $(PKG_NAME)
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
if PACKAGE_obuspa
|
||||
config OBUSPA_MTP_ENABLE_MQTT
|
||||
bool "Enable MQTT as mtp protocol"
|
||||
default y
|
||||
@@ -56,4 +55,10 @@ config OBUSPA_SESSION_EXTENSION
|
||||
Adds Device.LocalAgent.X_IOPSYS_EU_Session. object to simulate
|
||||
a CWMP like session
|
||||
|
||||
endif
|
||||
config OBUSPA_CWMP_DATAMODEL_SUPPORT
|
||||
bool "Adds USPAgent, STOMP and MQTT dm from CWMP"
|
||||
default n
|
||||
help
|
||||
Expose Device.USPAgent., Device.STOMP., Device.MQTT.Client. objects over
|
||||
ubus to make it available to bbfdm for CWMP access
|
||||
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=obuspa
|
||||
PKG_VERSION:=9.0.0.3
|
||||
PKG_VERSION:=9.0.0.18
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/obuspa.git
|
||||
PKG_SOURCE_VERSION:=b56fa3b8ce8d33239cbda3156d936a8d6f73cd0b
|
||||
PKG_SOURCE_VERSION:=91f9882651de301153060dfe0784859d849aa809
|
||||
PKG_MAINTAINER:=Vivek Dutta <vivek.dutta@iopsys.eu>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
@@ -34,7 +34,8 @@ define Package/obuspa
|
||||
MENU:=1
|
||||
DEPENDS:=+libopenssl +libuci +libblobmsg-json +libcurl +libsqlite3 +libubox +libubus +libmosquitto-ssl +libwebsockets-openssl +ca-certificates \
|
||||
+OBUSPA_ENABLE_TEST_CONTROLLER_LOCAL:mosquitto-ssl +OBUSPA_ENABLE_TEST_CONTROLLER_LOCAL:mosquitto-client-ssl \
|
||||
+OBUSPA_ENABLE_TEST_CONTROLLER:mosquitto-auth-shadow +libbbfdm-api +libjson-c
|
||||
+OBUSPA_ENABLE_TEST_CONTROLLER:mosquitto-auth-shadow +libjson-c
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
endef
|
||||
|
||||
define Package/obuspa/description
|
||||
@@ -120,14 +121,15 @@ define Package/obuspa/install
|
||||
$(INSTALL_DATA) ./files/etc/users/roles/*.json $(1)/etc/users/roles/
|
||||
$(INSTALL_DATA) ./files/etc/obuspa/usp_utils.sh $(1)/etc/obuspa/
|
||||
echo "$(CONFIG_BBF_VENDOR_PREFIX)" > $(1)/etc/obuspa/vendor_prefix
|
||||
$(INSTALL_DATA) ./files/etc/obuspa/dmcaching_exclude.json $(1)/etc/obuspa/dmcaching_exclude.json
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/01-fix-upgrade-uci $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/60-generate-ctrust-defaults $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/obuspa-set-dhcp-option $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/92-obuspa_firewall $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/firewall.usp $(1)/etc/
|
||||
$(INSTALL_BIN) ./files/etc/udhcpc.user.d/udhcpc_obuspa_opt125.user $(1)/etc/udhcpc.user.d/udhcpc_obuspa_opt125.user
|
||||
ifeq ($(CONFIG_OBUSPA_CWMP_DATAMODEL_SUPPORT),y)
|
||||
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/libuspagentdm.so $(1) $(PKG_NAME)
|
||||
endif
|
||||
ifeq ($(CONFIG_OBUSPA_ENABLE_TEST_CONTROLLER),y)
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/54-test-usp-remote $(1)/etc/uci-defaults/
|
||||
endif
|
||||
|
||||
@@ -2,13 +2,12 @@ config obuspa 'global'
|
||||
option enabled '1'
|
||||
option debug '1'
|
||||
option dhcp_discovery '1'
|
||||
option log_level '3'
|
||||
option log_level '2'
|
||||
option prototrace '0'
|
||||
option db_file '/etc/obuspa/usp.db'
|
||||
option max_group_sep '2'
|
||||
option ipc_timeout '30'
|
||||
option max_cache_time '600'
|
||||
option dm_caching_exclude '/etc/obuspa/dmcaching_exclude.json'
|
||||
#option max_group_sep '2'
|
||||
#option ipc_timeout '30'
|
||||
#option max_cache_time '600'
|
||||
#option trust_cert '/etc/obuspa/ca.pem'
|
||||
#option client_cert '/etc/obuspa/client.pem'
|
||||
#option log_dest '/tmp/obuspa.log'
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
log() {
|
||||
echo "$*"|logger -t obuspa.firewall -p debug
|
||||
}
|
||||
@@ -12,5 +14,5 @@ if [ "$enable_obuspa" = "0" ]; then
|
||||
fi
|
||||
|
||||
sleep 1
|
||||
log "ForceReconnect MQTT clients, due firewall reload"
|
||||
obuspa -c operate "Device.MQTT.Client.*.ForceReconnect()"
|
||||
log "Sending WakeUp! event to re-connect after firewall restart"
|
||||
obuspa -c event "Device.LocalAgent.WakeUp!"
|
||||
|
||||
@@ -40,7 +40,7 @@ db_set_reset_file()
|
||||
shift
|
||||
value="$*"
|
||||
|
||||
if [ -n "${param}" ] && [ -n "${value}" ]; then
|
||||
if [ -n "${param}" ]; then
|
||||
echo "${param} \"${value}\"">>${RESET_FILE}
|
||||
else
|
||||
echo >>${RESET_FILE}
|
||||
@@ -368,9 +368,21 @@ configure_controller()
|
||||
db_set "${BASEPATH}.MTP.1.Protocol" "${Protocol}"
|
||||
# only support configuration of one mtp path per controller using uci
|
||||
if [ "${Protocol}" = "MQTT" ]; then
|
||||
# Cleanup
|
||||
db_set "${BASEPATH}.MTP.1.WebSocket.Host" ""
|
||||
db_set "${BASEPATH}.MTP.1.WebSocket.Path" ""
|
||||
db_set "${BASEPATH}.MTP.1.STOMP.Reference" ""
|
||||
db_set "${BASEPATH}.MTP.1.STOMP.Destination" ""
|
||||
|
||||
db_set "${BASEPATH}.MTP.1.MQTT.Reference" "${dm_ref}"
|
||||
db_set "${BASEPATH}.MTP.1.MQTT.Topic" "${Topic}"
|
||||
elif [ "${Protocol}" = "STOMP" ]; then
|
||||
# Cleanup
|
||||
db_set "${BASEPATH}.MTP.1.WebSocket.Host" ""
|
||||
db_set "${BASEPATH}.MTP.1.WebSocket.Path" ""
|
||||
db_set "${BASEPATH}.MTP.1.MQTT.Reference" ""
|
||||
db_set "${BASEPATH}.MTP.1.MQTT.Topic" ""
|
||||
|
||||
db_set "${BASEPATH}.MTP.1.STOMP.Reference" "${dm_ref}"
|
||||
db_set "${BASEPATH}.MTP.1.STOMP.Destination" "${Destination}"
|
||||
elif [ "${Protocol}" = "CoAP" ]; then
|
||||
@@ -379,6 +391,12 @@ configure_controller()
|
||||
db_set "${BASEPATH}.MTP.1.CoAP.Port" "${Port}"
|
||||
db_set "${BASEPATH}.MTP.1.CoAP.EnableEncryption" "${EnableEncryption}"
|
||||
elif [ "${Protocol}" = "WebSocket" ]; then
|
||||
# Cleanup
|
||||
db_set "${BASEPATH}.MTP.1.STOMP.Reference" ""
|
||||
db_set "${BASEPATH}.MTP.1.STOMP.Destination" ""
|
||||
db_set "${BASEPATH}.MTP.1.MQTT.Reference" ""
|
||||
db_set "${BASEPATH}.MTP.1.MQTT.Topic" ""
|
||||
|
||||
db_set "${BASEPATH}.MTP.1.WebSocket.Host" "${Host}"
|
||||
db_set "${BASEPATH}.MTP.1.WebSocket.Port" "${Port}"
|
||||
db_set "${BASEPATH}.MTP.1.WebSocket.Path" "${Path}"
|
||||
@@ -509,18 +527,34 @@ configure_mtp() {
|
||||
db_set "${BASEPATH}.Enable" "${Enable}"
|
||||
db_set "${BASEPATH}.Protocol" "${Protocol}"
|
||||
if [ "${Protocol}" = "MQTT" ]; then
|
||||
# cleanup
|
||||
db_set "${BASEPATH}.WebSocket.Path" ""
|
||||
db_set "${BASEPATH}.STOMP.Reference" ""
|
||||
db_set "${BASEPATH}.STOMP.Destination" ""
|
||||
|
||||
db_set "${BASEPATH}.MQTT.Reference" "${dm_ref}"
|
||||
db_set "${BASEPATH}.MQTT.ResponseTopicConfigured" "${ResponseTopicConfigured}"
|
||||
if [ -n "${PublishQoS}" ]; then
|
||||
db_set "${BASEPATH}.MQTT.PublishQoS" "${PublishQoS}"
|
||||
fi
|
||||
elif [ "${Protocol}" = "STOMP" ]; then
|
||||
# cleanup
|
||||
db_set "${BASEPATH}.WebSocket.Path" ""
|
||||
db_set "${BASEPATH}.MQTT.Reference" ""
|
||||
db_set "${BASEPATH}.MQTT.ResponseTopicConfigured" ""
|
||||
|
||||
db_set "${BASEPATH}.STOMP.Reference" "${dm_ref}"
|
||||
db_set "${BASEPATH}.STOMP.Destination" "${Destination}"
|
||||
elif [ "${Protocol}" = "CoAP" ]; then
|
||||
db_set "${BASEPATH}.CoAP.Path" "${Path}"
|
||||
db_set "${BASEPATH}.CoAP.Port" "${Port}"
|
||||
elif [ "${Protocol}" = "WebSocket" ]; then
|
||||
# cleanup
|
||||
db_set "${BASEPATH}.MQTT.Reference" ""
|
||||
db_set "${BASEPATH}.MQTT.ResponseTopicConfigured" ""
|
||||
db_set "${BASEPATH}.STOMP.Reference" ""
|
||||
db_set "${BASEPATH}.STOMP.Destination" ""
|
||||
|
||||
db_set "${BASEPATH}.WebSocket.Path" "${Path}"
|
||||
db_set "${BASEPATH}.WebSocket.Port" "${Port}"
|
||||
db_set "${BASEPATH}.WebSocket.EnableEncryption" "${EnableEncryption}"
|
||||
@@ -879,6 +913,18 @@ check_n_delete_db()
|
||||
delete_sql_db_entry_with_pattern "${path}"
|
||||
}
|
||||
|
||||
workaround_remove_download_pattern()
|
||||
{
|
||||
local inst
|
||||
|
||||
inst="$(cat ${DB_DUMP} |grep -E "Device.DeviceInfo.FirmwareImage.\d.Download()"|grep -oE "Device.LocalAgent.Request.\d.")"
|
||||
|
||||
if [ -n "${inst}" ]; then
|
||||
log "Workaround to remove the old download Request [$inst]"
|
||||
delete_sql_db_entry_with_pattern "${inst}"
|
||||
fi
|
||||
}
|
||||
|
||||
reverse_update_db_with_uci()
|
||||
{
|
||||
if [ ! -f "${DB_DUMP}" ]; then
|
||||
@@ -965,6 +1011,7 @@ db_init()
|
||||
|
||||
cp /etc/config/obuspa /tmp/obuspa/
|
||||
if [ -f "${DB_DUMP}" ]; then
|
||||
workaround_remove_download_pattern
|
||||
mv ${DB_DUMP} ${RESET_FILE}
|
||||
fi
|
||||
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
{
|
||||
"dmcaching_exclude": [
|
||||
"Device.Hosts.Host.",
|
||||
"Device.IEEE1905.",
|
||||
"Device.WiFi.DataElements.",
|
||||
"Device.NAT.InterfaceSetting."
|
||||
]
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/core/device.h
|
||||
+++ b/src/core/device.h
|
||||
@@ -336,6 +336,10 @@ void DEVICE_CONTROLLER_SetInheritedRole(
|
||||
@@ -338,6 +338,10 @@ void DEVICE_CONTROLLER_SetInheritedRole(
|
||||
int DEVICE_CONTROLLER_CountEnabledWebsockClientConnections(void);
|
||||
#endif
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/core/mqtt.c
|
||||
+++ b/src/core/mqtt.c
|
||||
@@ -254,6 +254,8 @@ void QueueUspRecord_MQTT(mqtt_client_t *
|
||||
@@ -256,6 +256,8 @@ void MqttSubscriptionDestroy(mqtt_subscr
|
||||
#define DEFINE_MQTT_TrustCertVerifyCallbackIndex(index) \
|
||||
int MQTT_TrustCertVerifyCallback_##index (int preverify_ok, X509_STORE_CTX *x509_ctx) \
|
||||
{\
|
||||
@@ -9,7 +9,7 @@
|
||||
return DEVICE_SECURITY_TrustCertVerifyCallbackWithCertChain(preverify_ok, x509_ctx, &mqtt_clients[index].cert_chain);\
|
||||
}
|
||||
|
||||
@@ -264,6 +266,11 @@ DEFINE_MQTT_TrustCertVerifyCallbackIndex
|
||||
@@ -266,6 +268,11 @@ DEFINE_MQTT_TrustCertVerifyCallbackIndex
|
||||
DEFINE_MQTT_TrustCertVerifyCallbackIndex(2);
|
||||
DEFINE_MQTT_TrustCertVerifyCallbackIndex(3);
|
||||
DEFINE_MQTT_TrustCertVerifyCallbackIndex(4);
|
||||
@@ -21,7 +21,7 @@
|
||||
// Add more, with incrementing indexes here, if you change MAX_MQTT_CLIENTS
|
||||
|
||||
//------------------------------------------------------------------------------------
|
||||
@@ -274,10 +281,15 @@ ssl_verify_callback_t* mqtt_verify_callb
|
||||
@@ -276,10 +283,15 @@ ssl_verify_callback_t* mqtt_verify_callb
|
||||
MQTT_TrustCertVerifyCallbackIndex(2),
|
||||
MQTT_TrustCertVerifyCallbackIndex(3),
|
||||
MQTT_TrustCertVerifyCallbackIndex(4),
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
--- a/src/core/device_controller.c 2024-08-23 18:22:55.378560809 +0530
|
||||
+++ b/src/core/device_controller.c 2024-08-23 19:09:07.130278193 +0530
|
||||
@@ -4282,6 +4282,14 @@
|
||||
--- a/src/core/device_controller.c
|
||||
+++ b/src/core/device_controller.c
|
||||
@@ -4282,6 +4282,14 @@ int ProcessControllerAdded(int cont_inst
|
||||
goto exit;
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// Exit if unable to get the object instance numbers present in this controller's MTP table
|
||||
USP_SNPRINTF(path, sizeof(path), "%s.%d.MTP", device_cont_root, cont_instance);
|
||||
err = DATA_MODEL_GetInstances(path, &iv);
|
||||
@@ -4323,14 +4331,6 @@
|
||||
@@ -4323,14 +4331,6 @@ int ProcessControllerAdded(int cont_inst
|
||||
DEVICE_MQTT_UpdateControllerTopics();
|
||||
#endif
|
||||
|
||||
|
||||
37
obuspa/patches/0022-use-datamodel-caching.patch
Normal file
37
obuspa/patches/0022-use-datamodel-caching.patch
Normal file
@@ -0,0 +1,37 @@
|
||||
--- a/src/core/cli_server.c
|
||||
+++ b/src/core/cli_server.c
|
||||
@@ -753,6 +753,15 @@ int ExecuteCli_Get(char *arg1, char *arg
|
||||
}
|
||||
#endif
|
||||
|
||||
+ char *path[2] = {0};
|
||||
+
|
||||
+ path[0] = arg1;
|
||||
+ if (arg1 == NULL) {
|
||||
+ vendor_create_dm_cache(path, 0);
|
||||
+ } else {
|
||||
+ vendor_create_dm_cache(path, 1);
|
||||
+ }
|
||||
+
|
||||
// Exit if unable to get a list of all parameters referenced by the expression
|
||||
STR_VECTOR_Init(¶ms);
|
||||
INT_VECTOR_Init(&group_ids);
|
||||
--- a/src/core/data_model.h
|
||||
+++ b/src/core/data_model.h
|
||||
@@ -371,5 +371,6 @@ bool DM_PRIV_IsChildOf(char *path, dm_no
|
||||
bool DM_PRIV_IsChildNodeOf(dm_node_t *node, dm_node_t *parent_node);
|
||||
bool DM_PRIV_AreAllChildrenGroupId(dm_node_t *parent, int group_id);
|
||||
|
||||
+int vendor_create_dm_cache(char *paths[], int num_paths);
|
||||
#endif
|
||||
|
||||
--- a/src/core/handle_get.c
|
||||
+++ b/src/core/handle_get.c
|
||||
@@ -123,6 +123,7 @@ void MSG_HANDLER_HandleGet(Usp__Msg *usp
|
||||
goto exit;
|
||||
}
|
||||
|
||||
+ vendor_create_dm_cache(path_exprs, num_path_expr);
|
||||
// Calculate the number of hierarchical levels to traverse in the data model when performing partial path resolution
|
||||
// NOTE: protocol buffer has depth as an unsigned quantity, but internally we use a signed number, so limit range to that of a signed number
|
||||
depth = usp->body->request->get->max_depth;
|
||||
@@ -27,7 +27,8 @@ define Package/packet-capture-diagnostics
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=PacketCaptureDiagnostics datamodel
|
||||
DEPENDS:=+libbbfdm-api +tcpdump
|
||||
DEPENDS:=+tcpdump
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
MENU:=1
|
||||
endef
|
||||
|
||||
|
||||
@@ -26,7 +26,8 @@ define Package/periodicstats
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Periodic Statistics Daemon
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
endef
|
||||
|
||||
define Package/periodicstats/description
|
||||
|
||||
@@ -26,7 +26,8 @@ define Package/port-trigger
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Port Trigger Daemon
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api +kmod-ipt-trigger +kmod-ip6t-trigger +iptables-mod-nfqueue
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +kmod-ipt-trigger +kmod-ip6t-trigger +iptables-mod-nfqueue
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
endef
|
||||
|
||||
define Package/port-trigger/description
|
||||
|
||||
@@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=qosmngr
|
||||
PKG_VERSION:=1.0.15
|
||||
PKG_VERSION:=1.0.16
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=f6b77d16d2103b7336a476e710a10f1dd28274f6
|
||||
PKG_SOURCE_VERSION:=c723a2c999bb982030df2a47a69f356bfafa0af7
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/qosmngr.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
@@ -28,8 +28,9 @@ define Package/qosmngr
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=QoS Manager
|
||||
DEPENDS:=+libbbfdm-api +libuci +libubox +libubus +libblobmsg-json +libjson-c +libqos +!(TARGET_brcmbca||TARGET_airoha):tc-full
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libqos +!(TARGET_brcmbca||TARGET_airoha):tc-full
|
||||
DEPENDS+=+kmod-vlantranslation +kmod-dscp2pbit +!(TARGET_brcmbca):ebtables-legacy
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
endef
|
||||
|
||||
define Package/qosmngr/description
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=self-diagnostics
|
||||
PKG_VERSION:=1.0.9
|
||||
PKG_VERSION:=1.0.11
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
@@ -13,7 +13,8 @@ define Package/self-diagnostics
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=System Report
|
||||
DEPENDS:=+@CONFIG_BUSYBOX_CONFIG_TIMEOUT +@CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_PATH +@CONFIG_BUSYBOX_CONFIG_TEE \
|
||||
+@CONFIG_BUSYBOX_CONFIG_GZIP +libbbfdm-api
|
||||
+@CONFIG_BUSYBOX_CONFIG_GZIP
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
MENU:=1
|
||||
endef
|
||||
|
||||
|
||||
@@ -2,5 +2,5 @@ config globals 'globals'
|
||||
option extended_spec_dir '/etc/self-diagnostics/spec'
|
||||
option exec_timeout '5'
|
||||
option report_name 'self-diagnostics-report-$MODEL-$SERIAL'
|
||||
option verbose '0'
|
||||
option verbose '1'
|
||||
option compression_level '9'
|
||||
|
||||
@@ -5,16 +5,19 @@
|
||||
JSON_OUT=0
|
||||
SPEC_DIR="/usr/share/self-diagnostics/spec"
|
||||
SPEC_EXT_DIR="/etc/self-diagnostics/spec"
|
||||
REPORT_DIR="$(mktemp -d)"
|
||||
REPORT_PATH="/var/log/"
|
||||
REPORT_TEMP_DIR="$(mktemp -p ${REPORT_PATH} -d)"
|
||||
REPORT_NAME="self-test-diagnostics"
|
||||
VERBOSE=0
|
||||
COMPOPTS=""
|
||||
TIMEOUT=5
|
||||
JSON_OUT_BUFFER=""
|
||||
|
||||
cleanup()
|
||||
{
|
||||
[ -d "${REPORT_DIR}" ] && \
|
||||
rm -rf ${REPORT_DIR}
|
||||
if [ -d "${REPORT_TEMP_DIR}" ]; then
|
||||
rm -rf ${REPORT_TEMP_DIR}
|
||||
fi
|
||||
}
|
||||
|
||||
trap cleanup EXIT
|
||||
@@ -35,13 +38,20 @@ help()
|
||||
|
||||
log()
|
||||
{
|
||||
log_file="${REPORT_DIR}/execution.log"
|
||||
log_file="${REPORT_TEMP_DIR}/execution.log"
|
||||
if [ "$VERBOSE" -eq 1 ]; then
|
||||
logger -t $0 "$*"
|
||||
logger -p debug -t $0 "$*"
|
||||
fi
|
||||
echo "[$(date +%Y:%m:%d-%H:%M:%S)] $*" >> ${log_file}
|
||||
}
|
||||
|
||||
err_log()
|
||||
{
|
||||
log_file="${REPORT_TEMP_DIR}/execution.log"
|
||||
logger -p err -t $0 "$*"
|
||||
echo "[$(date +%Y:%m:%d-%H:%M:%S) ERR] $*" >> ${log_file}
|
||||
}
|
||||
|
||||
# Alias ubus to have a smaller 5-second timeout on all subsequent calls
|
||||
ubus()
|
||||
{
|
||||
@@ -60,10 +70,26 @@ config_load()
|
||||
local temp
|
||||
local MODEL SERIAL
|
||||
|
||||
log "# Starting Self diagnostics tests #"
|
||||
# Default value for MODEL and SERIAL
|
||||
MODEL="XXX"
|
||||
SERIAL="FFFFFFFFFFFF"
|
||||
|
||||
MODEL="$(db get device.deviceinfo.ModelName)"
|
||||
SERIAL="$(db get device.deviceinfo.SerialNumber)"
|
||||
log "# Starting Self diagnostics tests #"
|
||||
if [ "${JSON_OUT}" -eq 1 ]; then
|
||||
json_init
|
||||
json_add_string "report_dir" "${REPORT_PATH}"
|
||||
JSON_OUT_BUFFER="$(json_dump)"
|
||||
else
|
||||
echo "report_dir: ${REPORT_PATH}"
|
||||
fi
|
||||
|
||||
temp="$(db -q get device.deviceinfo.ModelName)"
|
||||
[ -d "${temp}" ] && \
|
||||
MODEL="${temp}"
|
||||
|
||||
temp="$(db -q get device.deviceinfo.SerialNumber)"
|
||||
[ -d "${temp}" ] && \
|
||||
SERIAL="${temp}"
|
||||
|
||||
temp="$(uci -q get self-diagnostics.globals.extended_spec_dir)"
|
||||
[ -d "${temp}" ] && \
|
||||
@@ -90,24 +116,25 @@ config_load()
|
||||
|
||||
exec_spec()
|
||||
{
|
||||
local json_file exec_skip name timeout exec_timeout rc
|
||||
local json_file exec_skip name timeout exec_timeout rc start_time end_time
|
||||
|
||||
start_time="$(date +%s)"
|
||||
json_file="$1"
|
||||
[ -z "$json_file" ] && {
|
||||
log "No/invalid spec json_file"
|
||||
err_log "No/invalid spec json_file"
|
||||
return 1
|
||||
}
|
||||
|
||||
log "Loading $json_file ..."
|
||||
log "# Loading $json_file at ${start_time} ..."
|
||||
|
||||
json_init
|
||||
json_load_file "${json_file}" || {
|
||||
log "Failed to load ${json_file} spec file"
|
||||
err_log "Failed to load ${json_file} spec file"
|
||||
return 1
|
||||
}
|
||||
|
||||
name="$(basename ${json_file})"
|
||||
export_path="${REPORT_DIR}/${name//.json/.log}"
|
||||
export_path="${REPORT_TEMP_DIR}/${name//.json/.log}"
|
||||
|
||||
exec_skip=0
|
||||
if json_is_a dependency array; then
|
||||
@@ -122,7 +149,7 @@ exec_spec()
|
||||
if [ "$type" == "file" ]; then
|
||||
json_get_var file file
|
||||
if [ ! -e "$file" ]; then
|
||||
log "${json_file} has unmet file dependency $file"
|
||||
err_log "${json_file} has unmet file dependency $file"
|
||||
exec_skip=1
|
||||
json_select ..
|
||||
continue
|
||||
@@ -135,7 +162,7 @@ exec_spec()
|
||||
fi
|
||||
|
||||
[ "${exec_skip}" -eq 1 ] && {
|
||||
log "Dependency not satisfied for ${json_file}"
|
||||
err_log "Dependency not satisfied for ${json_file}"
|
||||
return 0
|
||||
}
|
||||
|
||||
@@ -149,7 +176,10 @@ exec_spec()
|
||||
for key in $keys; do
|
||||
if json_is_a $key object; then
|
||||
json_select $key
|
||||
local cmd_skip file
|
||||
|
||||
cmd_skip=0
|
||||
file=""
|
||||
if json_is_a dependency array; then
|
||||
json_select "dependency"
|
||||
json_get_keys d_keys
|
||||
@@ -174,7 +204,7 @@ exec_spec()
|
||||
|
||||
[ $cmd_skip -eq 1 ] && {
|
||||
json_select ..
|
||||
log "Dependency not satisfied for ${file}"
|
||||
err_log "Dependency not satisfied for ${file}"
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -192,24 +222,14 @@ exec_spec()
|
||||
echo "# $description #">> $export_path
|
||||
echo "# Exec [$cmd], timeout [$exec_timeout] #" >> $export_path
|
||||
echo "##########################################" >> $export_path
|
||||
if [ "$VERBOSE" -eq 1 ]; then
|
||||
if [[ "$cmd" == *"logread "* ]]; then
|
||||
eval timeout ${exec_timeout} $cmd 2>&1 | tee -a $export_path
|
||||
rc=$?
|
||||
else
|
||||
eval timeout ${exec_timeout} $cmd 2>&1 | tee -a $export_path | logger -t self-diagnostics
|
||||
rc=$?
|
||||
fi
|
||||
else
|
||||
eval timeout ${exec_timeout} $cmd >> $export_path 2>&1
|
||||
rc=$?
|
||||
fi
|
||||
echo "######## Execution return code $rc ######" >> $export_path
|
||||
eval timeout ${exec_timeout} $cmd >> $export_path 2>&1
|
||||
rc=$?
|
||||
echo "######## Execution done return code $rc ######" >> $export_path
|
||||
|
||||
if [ "$rc" -eq 0 ]; then
|
||||
log "Execution [$cmd] completed"
|
||||
else
|
||||
log "Execution [$cmd] Failed/Timeout with $rc exit code"
|
||||
err_log "Execution [$cmd] Failed/Timeout with $rc exit code"
|
||||
fi
|
||||
|
||||
echo >> $export_path
|
||||
@@ -219,7 +239,8 @@ exec_spec()
|
||||
json_select ..
|
||||
fi
|
||||
|
||||
log "Handling of $json_file done"
|
||||
end_time="$(date +%s)"
|
||||
log "# Handling of $json_file done, time: ${end_time}, time_spent: $((end_time - start_time)) sec"
|
||||
log ""
|
||||
}
|
||||
|
||||
@@ -314,38 +335,51 @@ list_modules()
|
||||
|
||||
generate_report()
|
||||
{
|
||||
local filename report_path
|
||||
local filename
|
||||
|
||||
report_path="$(dirname "${REPORT_DIR}")"
|
||||
filename="${report_path}/${REPORT_NAME}"
|
||||
filename="${REPORT_PATH}/${REPORT_NAME}"
|
||||
|
||||
[ -f "${filename}.tar" ] && rm "${filename}.tar"
|
||||
[ -f "${filename}.tar.gz" ] && rm "${filename}.tar.gz"
|
||||
|
||||
log "# Report generation completed #"
|
||||
cd ${REPORT_DIR} && {
|
||||
cd ${REPORT_TEMP_DIR} && {
|
||||
filename="${filename}.tar"
|
||||
tar -cf "${filename}" *
|
||||
}
|
||||
|
||||
rm -r "$REPORT_DIR"
|
||||
|
||||
if [ -n "$COMPOPTS" ]; then
|
||||
gzip -${COMPOPTS} -f "${filename}"
|
||||
filename="${filename}.gz"
|
||||
fi
|
||||
|
||||
# Move logs if failed to generate tar
|
||||
if [ ! -f "${filename}" ]; then
|
||||
mv ${REPORT_TEMP_DIR}/*.log ${REPORT_PATH}/
|
||||
fi
|
||||
|
||||
if [ "${JSON_OUT}" -eq 1 ]; then
|
||||
json_init
|
||||
json_add_string result "${filename}"
|
||||
json_load "${JSON_OUT_BUFFER}"
|
||||
if [ -f "${filename}" ]; then
|
||||
json_add_string result "${filename}"
|
||||
else
|
||||
log "error: Failed to generate report tar, check logs in ${REPORT_PATH}"
|
||||
json_add_string error "Failed to generate report tar, check logs in ${REPORT_PATH}"
|
||||
fi
|
||||
json_dump
|
||||
else
|
||||
echo "${filename}"
|
||||
if [ -f "${filename}" ]; then
|
||||
echo "result: ${filename}"
|
||||
else
|
||||
log "error: Failed to generate report tar, check logs in ${REPORT_PATH}"
|
||||
echo "error: Failed to generate report tar, check logs in ${REPORT_PATH}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
[ ! -d "${SPEC_DIR}" ] && {
|
||||
log "# ${SPEC_DIR} does not exits"
|
||||
log "# ${SPEC_DIR} does not exist"
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
13
self-diagnostics/files/usr/share/self-diagnostics/helper/var_state_dump.sh
Executable file
13
self-diagnostics/files/usr/share/self-diagnostics/helper/var_state_dump.sh
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
function dump_var_state_file()
|
||||
{
|
||||
for f in `ls -1 /var/state/`; do
|
||||
if [ -f "var/state/$f" ]; then
|
||||
echo "cat /var/state/$f"
|
||||
cat "/var/state/$f"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
dump_var_state_file
|
||||
0
self-diagnostics/files/usr/share/self-diagnostics/helper/wifi_assoclist.sh
Normal file → Executable file
0
self-diagnostics/files/usr/share/self-diagnostics/helper/wifi_assoclist.sh
Normal file → Executable file
0
self-diagnostics/files/usr/share/self-diagnostics/helper/wifi_radio_scan.sh
Normal file → Executable file
0
self-diagnostics/files/usr/share/self-diagnostics/helper/wifi_radio_scan.sh
Normal file → Executable file
0
self-diagnostics/files/usr/share/self-diagnostics/helper/wifi_radio_status.sh
Normal file → Executable file
0
self-diagnostics/files/usr/share/self-diagnostics/helper/wifi_radio_status.sh
Normal file → Executable file
@@ -18,8 +18,8 @@
|
||||
"cmd": "uci export"
|
||||
},
|
||||
{
|
||||
"description": "Runtime Configuration",
|
||||
"cmd": "cat /var/state/*"
|
||||
"description": "Runtime Configuration (/var/state/)",
|
||||
"cmd": "sh /usr/share/self-diagnostics/helper/var_state_dump.sh"
|
||||
},
|
||||
{
|
||||
"description": "Firmware Environment",
|
||||
|
||||
@@ -13,6 +13,10 @@
|
||||
"description": "Board Info",
|
||||
"cmd": "ubus call system board"
|
||||
},
|
||||
{
|
||||
"description": "System Log",
|
||||
"cmd": "logread"
|
||||
},
|
||||
{
|
||||
"description": "Running Processes",
|
||||
"cmd": "top -b -n 1"
|
||||
@@ -21,13 +25,9 @@
|
||||
"description": "Kernel Parameters",
|
||||
"cmd": "sysctl -A 2>/dev/null"
|
||||
},
|
||||
{
|
||||
"description": "System Log",
|
||||
"cmd": "timeout 5 logread -l 1000"
|
||||
},
|
||||
{
|
||||
"description": "Driver Message",
|
||||
"cmd": "timeout 5 dmesg"
|
||||
"cmd": "dmesg"
|
||||
},
|
||||
{
|
||||
"description": "PCI Devices",
|
||||
|
||||
@@ -17,15 +17,18 @@
|
||||
},
|
||||
{
|
||||
"description": "WiFi Radio Status",
|
||||
"cmd": "sh /usr/share/self-diagnostics/helper/wifi_radio_status.sh"
|
||||
"cmd": "sh /usr/share/self-diagnostics/helper/wifi_radio_status.sh",
|
||||
"timeout": 10
|
||||
},
|
||||
{
|
||||
"description": "Get radio scan",
|
||||
"cmd": "sh /usr/share/self-diagnostics/helper/wifi_radio_scan.sh"
|
||||
"cmd": "sh /usr/share/self-diagnostics/helper/wifi_radio_scan.sh",
|
||||
"timeout": 10
|
||||
},
|
||||
{
|
||||
"description": "Get Assoc List",
|
||||
"cmd": "sh /usr/share/self-diagnostics/helper/wifi_assoclist.sh"
|
||||
"cmd": "sh /usr/share/self-diagnostics/helper/wifi_assoclist.sh",
|
||||
"timeout": 10
|
||||
},
|
||||
{
|
||||
"description": "List Wireless Devices",
|
||||
|
||||
@@ -17,8 +17,9 @@ static char *get_selftest_log_instance(struct dmctx *ctx)
|
||||
{
|
||||
char *file_name = NULL;
|
||||
char *path = NULL;
|
||||
char *file_uri = NULL;
|
||||
|
||||
struct uci_section *s = get_origin_section_from_config("system", "system", "self_test_log");
|
||||
struct uci_section *s = get_origin_section_from_dmmap("dmmap_logmngr", "self_test", "self_test_log");
|
||||
if (s == NULL)
|
||||
goto err;
|
||||
|
||||
@@ -26,7 +27,8 @@ static char *get_selftest_log_instance(struct dmctx *ctx)
|
||||
if (DM_STRLEN(file_name) == 0)
|
||||
goto err;
|
||||
|
||||
_bbfdm_get_references(ctx, "Device.DeviceInfo.VendorLogFile.", "Name", file_name, &path);
|
||||
dmasprintf(&file_uri, "file://%s", file_name);
|
||||
_bbfdm_get_references(ctx, "Device.DeviceInfo.VendorLogFile.", "Name", file_uri, &path);
|
||||
|
||||
err:
|
||||
return path ? path : dmstrdup("");
|
||||
@@ -65,15 +67,15 @@ int operate_Device_SelfTest(char *refparam, struct dmctx *ctx, void *data, char
|
||||
if (!file_exists(output))
|
||||
goto err;
|
||||
|
||||
/* Add in vendor log */
|
||||
struct uci_section *s = get_origin_section_from_config("system", "system", "self_test_log");
|
||||
/* Add in dmmap_logmngr */
|
||||
struct uci_section *s = get_origin_section_from_dmmap("dmmap_logmngr", "self_test", "self_test_log");
|
||||
if (s == NULL) {
|
||||
dmuci_add_section("system", "system", &s);
|
||||
dmuci_add_section_bbfdm("dmmap_logmngr", "self_test", &s);
|
||||
dmuci_rename_section_by_section(s, "self_test_log");
|
||||
}
|
||||
|
||||
dmuci_set_value_by_section(s, "log_file", output);
|
||||
dmuci_commit_package("system");
|
||||
dmuci_commit_package_bbfdm("dmmap_logmngr");
|
||||
|
||||
/* Get self test log instance */
|
||||
char *result = get_selftest_log_instance(ctx);
|
||||
@@ -133,7 +135,7 @@ static int get_SelfTest_Results(char *refparam, struct dmctx *ctx, void *data, c
|
||||
DMLEAF tSelfTestParams[] = {
|
||||
/* PARAM, permission, type, getvalue, setvalue, bbfdm_type*/
|
||||
{"DiagnosticsState", &DMWRITE, DMT_STRING, get_SelfTest_DiagnosticsState, set_SelfTest_DiagnosticsState, BBFDM_CWMP},
|
||||
{"Results", &DMREAD, DMT_STRING, get_SelfTest_Results, NULL, BBFDM_CWMP},
|
||||
{"Results", &DMREAD, DMT_STRING, get_SelfTest_Results, NULL, BBFDM_CWMP, DM_FLAG_REFERENCE},
|
||||
{0}
|
||||
};
|
||||
|
||||
|
||||
@@ -33,7 +33,8 @@ endef
|
||||
define Package/ssdpd
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
DEPENDS:=+libnfnetlink +libpthread +libubox +libubus +libblobmsg-json +libcurl +mxml +SSDPD_UPNP_DEVICE:miniupnpd-iptables +libbbfdm-api
|
||||
DEPENDS:=+libnfnetlink +libpthread +libubox +libubus +libblobmsg-json +libcurl +mxml +SSDPD_UPNP_DEVICE:miniupnpd-iptables
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
TITLE:=MiniSSDPd - SSDP Daemon
|
||||
URL:=https://miniupnp.tuxfamily.org/minissdpd.html
|
||||
endef
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=sshmngr
|
||||
PKG_VERSION:=1.0.4
|
||||
PKG_VERSION:=1.0.5
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/sshmngr.git
|
||||
PKG_SOURCE_VERSION:=c56a09b2ffd7b944dff4ef7c9ae3a98c68e2427f
|
||||
PKG_SOURCE_VERSION:=0c7d58a51d6f5eb4ad33e03630206bbb4e559779
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -28,7 +28,8 @@ define Package/sshmngr
|
||||
SECTION:=net
|
||||
CATEGORY:=Network
|
||||
TITLE:=Package to add Device.SSH data model support.
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
DEPENDS+=+SSHMNGR_BACKEND_OPENSSH:openssh-server +SSHMNGR_BACKEND_OPENSSH:openssh-client-utils
|
||||
DEPENDS+=+SSHMNGR_BACKEND_OPENSSH_PAM:openssh-server-pam +SSHMNGR_BACKEND_OPENSSH_PAM:openssh-client-utils
|
||||
DEPENDS+=+SSHMNGR_BACKEND_DROPBEAR:dropbear
|
||||
|
||||
@@ -32,7 +32,8 @@ define Package/stunc
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=BBF STUN Client
|
||||
DEPENDS:=+libubus +libuci +libubox +libjson-c +libblobmsg-json +libbbfdm-api +libopenssl
|
||||
DEPENDS:=+libubus +libuci +libubox +libjson-c +libblobmsg-json +libopenssl
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=swmodd
|
||||
PKG_VERSION:=2.5.17
|
||||
PKG_VERSION:=2.5.19
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/lcm/swmodd.git
|
||||
PKG_SOURCE_VERSION:=f14859ab9a5e829ebbe9b3736c2677ee7e7c36cf
|
||||
PKG_SOURCE_VERSION:=efc41f62740e425751b71beabf940324a37cc08d
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -33,8 +33,8 @@ define Package/swmodd
|
||||
DEPENDS:=+libuci +libubox +ubus +libuuid +opkg +libcurl \
|
||||
+PACKAGE_lxc:lxc +PACKAGE_liblxc:liblxc +@BUSYBOX_CONFIG_BUSYBOX \
|
||||
+@BUSYBOX_CONFIG_FEATURE_SHOW_SCRIPT +@BUSYBOX_CONFIG_SCRIPT \
|
||||
+jq +libbbfdm-api +@CONFIG_KERNEL_CGROUPS \
|
||||
+SWMODD_LEGACY_CGROUPS:swmodd-cgroup
|
||||
+jq +@CONFIG_KERNEL_CGROUPS +SWMODD_LEGACY_CGROUPS:swmodd-cgroup
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
endef
|
||||
|
||||
define Package/swmodd/description
|
||||
|
||||
@@ -56,7 +56,7 @@ configure_lxc_container() {
|
||||
}
|
||||
|
||||
configure_crun_container() {
|
||||
local name type autostart du_status requested_state url username password capability
|
||||
local name type autostart du_status requested_state url username password capability envlist
|
||||
local BRIDGE BUNDLE BOOT PERM
|
||||
local RUNNER="/etc/swmodd/run.sh"
|
||||
|
||||
@@ -74,6 +74,12 @@ configure_crun_container() {
|
||||
config_get username "${1}" username ""
|
||||
config_get password "${1}" password ""
|
||||
config_get capability "${1}" capability ""
|
||||
config_get envlist "${1}" env_var ""
|
||||
|
||||
if [ -n "${envlist}" ]; then
|
||||
envlist="${envlist// /;}"
|
||||
fi
|
||||
|
||||
if [ -n "${capability}" ]; then
|
||||
PERM="-p ${capability// /,}"
|
||||
fi
|
||||
@@ -152,7 +158,7 @@ configure_crun_container() {
|
||||
|
||||
if [ "${BOOT}" -eq "1" ]; then
|
||||
if [ "${autostart}" -eq 1 ]; then
|
||||
${RUNNER} -U -b "${BUNDLE}" -n "${name}" ${PERM}
|
||||
${RUNNER} -U -b "${BUNDLE}" -n "${name}" -e "${envlist}" ${PERM}
|
||||
result=$(cat ${BUNDLE}/${name}/config.json |jq ".annotations.org_opencontainers_image_description")
|
||||
if [ "${result}" != "null" ]; then
|
||||
uci_set ocicontainer "${1}" description "${result}"
|
||||
@@ -185,7 +191,7 @@ configure_crun_container() {
|
||||
${RUNNER} -u -n "${name}" -i "${BRIDGE}" ${PERM}
|
||||
crun resume "${name}"
|
||||
else
|
||||
${RUNNER} -U -b "${BUNDLE}" -n "${name}" ${PERM}
|
||||
${RUNNER} -U -b "${BUNDLE}" -n "${name}" -e "${envlist}" ${PERM}
|
||||
result=$(cat ${BUNDLE}/${name}/config.json |jq ".annotations.org_opencontainers_image_description")
|
||||
if [ "${result}" != "null" ]; then
|
||||
uci_set ocicontainer "${1}" description "${result}"
|
||||
|
||||
@@ -144,6 +144,20 @@ update_config_json() {
|
||||
json_add_string hostname "${NAME}"
|
||||
fi
|
||||
|
||||
if [ -n "${ENVLIST}" ]; then
|
||||
json_select process
|
||||
json_get_values preenv env
|
||||
json_select env
|
||||
for i in ${ENVLIST//;/ }; do
|
||||
key="$(echo $i|cut -d= -f1)"
|
||||
if [[ "${preenv}" != *"${key}="* ]]; then
|
||||
json_add_string "" "${i}"
|
||||
fi
|
||||
done
|
||||
json_select ..
|
||||
json_select ..
|
||||
fi
|
||||
|
||||
# Update cabalities
|
||||
if [ -n "${PERM}" ]; then
|
||||
log "Updating Permission in the json ..."
|
||||
@@ -264,10 +278,11 @@ clean=0
|
||||
net_update=0
|
||||
update_json=0
|
||||
PERM=""
|
||||
ENVLIST=""
|
||||
|
||||
log "## Runner [$@] ##"
|
||||
|
||||
while getopts b:n:i:r:l:t:p:cuU options
|
||||
while getopts b:n:i:r:l:t:p:e:cuU options
|
||||
do
|
||||
case "${options}" in
|
||||
b) BUNDLE=${OPTARG};;
|
||||
@@ -278,6 +293,7 @@ do
|
||||
r) REGURL=${OPTARG};;
|
||||
l) LOGIN=${OPTARG};;
|
||||
t) TIMEOUT=${OPTARG};;
|
||||
e) ENVLIST=${OPTARG};;
|
||||
u) net_update=1;;
|
||||
U) update_json=1;;
|
||||
*) log "Invalid options";;
|
||||
|
||||
35
sysmngr/Config.in
Normal file
35
sysmngr/Config.in
Normal file
@@ -0,0 +1,35 @@
|
||||
if PACKAGE_sysmngr
|
||||
|
||||
config SYSMNGR_VENDOR_CONFIG_FILE
|
||||
bool "Enable Device.DeviceInfo.VendorConfigFile. Object"
|
||||
default y
|
||||
|
||||
config SYSMNGR_MEMORY_STATUS
|
||||
bool "Enable Device.DeviceInfo.MemoryStatus. Object"
|
||||
default y
|
||||
|
||||
config SYSMNGR_PROCESS_STATUS
|
||||
bool "Enable Device.DeviceInfo.ProcessStatus. Object"
|
||||
default y
|
||||
|
||||
config SYSMNGR_SUPPORTED_DATA_MODEL
|
||||
bool "Enable Device.DeviceInfo.SupportedDataModel. Object"
|
||||
default y
|
||||
|
||||
config SYSMNGR_FIRMWARE_IMAGE
|
||||
bool "Enable Device.DeviceInfo.FirmwareImage. Object"
|
||||
default y
|
||||
|
||||
config SYSMNGR_REBOOTS
|
||||
bool "Enable Device.DeviceInfo.Reboots. Object"
|
||||
default y
|
||||
|
||||
config SYSMNGR_NETWORK_PROPERTIES
|
||||
bool "Enable Device.DeviceInfo.NetworkProperties. Object"
|
||||
default y
|
||||
|
||||
config SYSMNGR_VENDOR_EXTENSIONS
|
||||
bool "Enable vendor extensions for Device.DeviceInfo."
|
||||
default y
|
||||
|
||||
endif
|
||||
103
sysmngr/Makefile
Normal file
103
sysmngr/Makefile
Normal file
@@ -0,0 +1,103 @@
|
||||
#
|
||||
# Copyright (C) 2024 IOPSYS
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=sysmngr
|
||||
PKG_VERSION:=1.0.5
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/system/sysmngr.git
|
||||
PKG_SOURCE_VERSION:=ff129f75b9266e2b3cdc6bb319b12378f9ec5511
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/iopsys/bbfdm/bbfdm.mk
|
||||
|
||||
define Package/$(PKG_NAME)
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=System manager daemon
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libopenssl
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
MENU:=1
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
MAKE_PATH:=src
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
Manage device info and provides Device.DeviceInfo. datamodel object based on TR181-2.18
|
||||
endef
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
$(CP) -rf ~/git/sysmngr/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
endif
|
||||
|
||||
TARGET_CFLAGS += -DBBF_VENDOR_PREFIX=\\\"$(CONFIG_BBF_VENDOR_PREFIX)\\\"
|
||||
|
||||
ifeq ($(CONFIG_SYSMNGR_VENDOR_CONFIG_FILE),y)
|
||||
MAKE_FLAGS += SYSMNGR_VENDOR_CONFIG_FILE=y
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SYSMNGR_MEMORY_STATUS),y)
|
||||
MAKE_FLAGS += SYSMNGR_MEMORY_STATUS=y
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SYSMNGR_PROCESS_STATUS),y)
|
||||
MAKE_FLAGS += SYSMNGR_PROCESS_STATUS=y
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SYSMNGR_SUPPORTED_DATA_MODEL),y)
|
||||
MAKE_FLAGS += SYSMNGR_SUPPORTED_DATA_MODEL=y
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SYSMNGR_FIRMWARE_IMAGE),y)
|
||||
MAKE_FLAGS += SYSMNGR_FIRMWARE_IMAGE=y
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SYSMNGR_REBOOTS),y)
|
||||
MAKE_FLAGS += SYSMNGR_REBOOTS=y
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SYSMNGR_NETWORK_PROPERTIES),y)
|
||||
MAKE_FLAGS += SYSMNGR_NETWORK_PROPERTIES=y
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_SYSMNGR_VENDOR_EXTENSIONS),y)
|
||||
MAKE_FLAGS += SYSMNGR_VENDOR_EXTENSIONS=y
|
||||
endif
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/etc/config/
|
||||
$(INSTALL_CONF) ./files/etc/config/sysmngr $(1)/etc/config/sysmngr
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/sysmngr $(1)/usr/sbin/sysmngr
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/etc/init.d/sysmngr $(1)/etc/init.d/sysmngr
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/sysmngr
|
||||
$(INSTALL_BIN) ./files/etc/sysmngr/critical_state_logger.sh $(1)/etc/sysmngr/critical_state_logger.sh
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/share/bbfdm/scripts
|
||||
$(CP) $(PKG_BUILD_DIR)/src/files/usr/share/bbfdm/scripts/bbf_activate_handler.sh $(1)/usr/share/bbfdm/scripts/
|
||||
$(CP) $(PKG_BUILD_DIR)/src/files/usr/share/bbfdm/scripts/bbf_check_idle.sh $(1)/usr/share/bbfdm/scripts/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
27
sysmngr/files/etc/config/sysmngr
Normal file
27
sysmngr/files/etc/config/sysmngr
Normal file
@@ -0,0 +1,27 @@
|
||||
|
||||
config globals 'globals'
|
||||
option log_level '3'
|
||||
|
||||
config reboots 'reboots'
|
||||
option max_reboot_entries '3'
|
||||
|
||||
config process_status 'process'
|
||||
option instance_refresh_interval '0'
|
||||
|
||||
config memory_status 'memory'
|
||||
option enable '0'
|
||||
option polling_interval '60'
|
||||
option critical_rise_threshold '80'
|
||||
option critical_fall_threshold '60'
|
||||
option enable_critical_log '0'
|
||||
option file_path '/var/log/critical_memory.log'
|
||||
|
||||
config cpu_status 'cpu'
|
||||
option enable '0'
|
||||
option poll_interval '5'
|
||||
option num_samples '30'
|
||||
option critical_rise_threshold '80'
|
||||
option critical_fall_threshold '60'
|
||||
option enable_critical_log '0'
|
||||
option file_path '/var/log/critical_cpu.log'
|
||||
|
||||
37
sysmngr/files/etc/init.d/sysmngr
Normal file
37
sysmngr/files/etc/init.d/sysmngr
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=15
|
||||
STOP=8
|
||||
|
||||
USE_PROCD=1
|
||||
PROG=/usr/sbin/sysmngr
|
||||
|
||||
start_service()
|
||||
{
|
||||
local log_level
|
||||
|
||||
config_load sysmngr
|
||||
config_get log_level "globals" log_level 4
|
||||
|
||||
procd_open_instance "sysmngr"
|
||||
procd_set_param command ${PROG}
|
||||
procd_append_param command -l "${log_level}"
|
||||
procd_set_param respawn
|
||||
procd_close_instance "sysmngr"
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
ret=$(ubus call service list '{"name":"sysmngr"}' | jsonfilter -qe '@.sysmngr.instances.sysmngr.running')
|
||||
if [ "$ret" != "true" ]; then
|
||||
stop
|
||||
start
|
||||
else
|
||||
ubus send sysmngr.reload
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
service_triggers() {
|
||||
procd_add_reload_trigger sysmngr
|
||||
}
|
||||
78
sysmngr/files/etc/sysmngr/critical_state_logger.sh
Executable file
78
sysmngr/files/etc/sysmngr/critical_state_logger.sh
Executable file
@@ -0,0 +1,78 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Function to execute commands and append outputs to the log file
|
||||
execute_commands() {
|
||||
log_path="$1" # Log file path
|
||||
cmd="$2" # Command
|
||||
|
||||
echo "Output of command: $cmd" >> "$log_path"
|
||||
$cmd >> "$log_path" 2>&1
|
||||
echo "" >> "$log_path"
|
||||
}
|
||||
|
||||
# Function to generate a critical state log
|
||||
generate_critical_log() {
|
||||
log_path="$1" # Path to the log file
|
||||
log_name="$2" # Name of the critical state (CPU or Memory)
|
||||
critical_state="$3" # Boolean-like string to indicate critical state ("true" or "false")
|
||||
|
||||
# Get the current time in a formatted way
|
||||
log_time=$(date "+%Y-%m-%d %H:%M:%S")
|
||||
|
||||
# Determine critical state description
|
||||
if [ "$critical_state" = "true" ]; then
|
||||
state_desc="Reached"
|
||||
else
|
||||
state_desc="No Longer Present"
|
||||
fi
|
||||
|
||||
# Write the log header with a timestamp
|
||||
echo "=== $log_name Critical State $state_desc at $log_time ===" >> "$log_path"
|
||||
echo "Running diagnostic commands..." >> "$log_path"
|
||||
|
||||
# Common commands for CPU and Memory
|
||||
execute_commands "$log_path" "top -b -n 1"
|
||||
execute_commands "$log_path" "free"
|
||||
|
||||
# Add specific commands based on the critical state type
|
||||
if [ "$log_name" = "CPU" ]; then
|
||||
execute_commands "$log_path" "ps"
|
||||
elif [ "$log_name" = "Memory" ]; then
|
||||
execute_commands "$log_path" "df -h"
|
||||
fi
|
||||
|
||||
# End of log entry
|
||||
echo "=== End of Critical $log_name Log ===" >> "$log_path"
|
||||
echo "" >> "$log_path"
|
||||
|
||||
# Echo a success message to indicate script completion
|
||||
echo "Success: Log generation completed successfully."
|
||||
}
|
||||
|
||||
# Main script logic
|
||||
if [ "$#" -ne 3 ]; then
|
||||
echo "Usage: $0 <type: CPU|Memory> <log_file_path> <critical_state: true|false>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
type="$1" # First argument: type of critical state (CPU or Memory)
|
||||
log_file_path="$2" # Second argument: path to log file
|
||||
critical_state="$3" # Third argument: critical state indicator ("true" or "false")
|
||||
|
||||
# Validate the critical state type
|
||||
if [ "$type" != "CPU" ] && [ "$type" != "Memory" ]; then
|
||||
echo "Invalid type: $type. Must be 'CPU' or 'Memory'."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Validate the log file path before proceeding
|
||||
if [ ! -f "$log_file_path" ]; then
|
||||
echo "Error: File $log_file_path does not exist"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Generate the log
|
||||
generate_critical_log "$log_file_path" "$type" "$critical_state"
|
||||
|
||||
# Exit with success code
|
||||
exit 0
|
||||
@@ -29,7 +29,8 @@ define Package/$(PKG_NAME)
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=Time manager daemon based on ntpd
|
||||
DEPENDS:=+bbfdmd +ntpd +libuci +libubox +ubus +libbbfdm-api +libbbfdm-ubus +@BUSYBOX_CONFIG_PGREP
|
||||
DEPENDS:=+ntpd +libuci +libubox +ubus +@BUSYBOX_CONFIG_PGREP
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +bbfdmd
|
||||
MENU:=1
|
||||
endef
|
||||
|
||||
|
||||
@@ -81,4 +81,7 @@ if uci -q get system.ntp >/dev/null 2>&1; then
|
||||
fi
|
||||
|
||||
uci -q delete system.ntp
|
||||
|
||||
uci commit time
|
||||
uci commit system
|
||||
fi
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=tr104
|
||||
PKG_VERSION:=1.0.32
|
||||
PKG_VERSION:=1.0.34
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifeq ($(LOCAL_DEV),0)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/voice/tr104.git
|
||||
PKG_SOURCE_VERSION:=5632a71e0da8d498c214469dec76d2774f3a8a15
|
||||
PKG_SOURCE_VERSION:=51c55b680f02c75cf329871f33d9a4ae43731f50
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -32,7 +32,7 @@ define Package/$(PKG_NAME)
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=TR104 Datamodel Daemon
|
||||
MENU:=1
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +asterisk +libcurl +PACKAGE_libbbfdm-api:libbbfdm-api
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +asterisk +libcurl +PACKAGE_libbbfdm-api:libbbfdm-api +PACKAGE_libbbfdm-ubus:libbbfdm-ubus +PACKAGE_dm-service:dm-service
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
|
||||
@@ -25,7 +25,8 @@ include ../bbfdm/bbfdm.mk
|
||||
define Package/tr143
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=TR-143 Data Model Support
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libbbfdm-api +netmngr
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service +netmngr
|
||||
endef
|
||||
|
||||
define Package/tr143/description
|
||||
|
||||
@@ -25,7 +25,8 @@ include ../bbfdm/bbfdm.mk
|
||||
define Package/tr471
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=TR-471 Data Model Support
|
||||
DEPENDS:=+obudpst +libuci +libubox +libubus +libblobmsg-json +libbbfdm-api +netmngr
|
||||
DEPENDS:=+obudpst +libuci +libubox +libubus +libblobmsg-json
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service +netmngr
|
||||
endef
|
||||
|
||||
define Package/tr471/description
|
||||
|
||||
@@ -28,7 +28,8 @@ define Package/$(PKG_NAME)
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=TWAMP Light Client(TR-390)
|
||||
DEPENDS:=+libuci +ubox +libubus +libbbfdm-api +netmngr
|
||||
DEPENDS:=+libuci +ubox +libubus
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service +netmngr
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
|
||||
@@ -35,7 +35,7 @@ define Package/$(PKG_NAME)-server
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=TRx69
|
||||
TITLE:=BBF UDP Echo Server
|
||||
DEPENDS:=+libuci +libbbfdm-api +netmngr
|
||||
DEPENDS:=+libuci +libbbfdm-api +netmngr +libbbfdm-ubus +dm-service
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)-client
|
||||
|
||||
13
urlfilter/Config.in
Normal file
13
urlfilter/Config.in
Normal file
@@ -0,0 +1,13 @@
|
||||
if PACKAGE_urlfilter
|
||||
|
||||
menu "Configuration"
|
||||
|
||||
config URLFILTER_INCLUDE_BUNDLES
|
||||
bool "Include default bundle files"
|
||||
default n
|
||||
help
|
||||
Set this option to include bundle files by default,
|
||||
they are also included in the UCI, urlfilter
|
||||
still needs to be enabled though.
|
||||
endmenu
|
||||
endif
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user