zabbix: reorganize files dir for clarity and to better follow the FHS

Reorganize the extra files under the 'files' dir so that it is more
clear where they go and what they are for, and to avoid having a
disorganized mass of files.

Move the extra C source file out of files and into 'src-extra'.

Avoid treating openwrt-supplied params files as configuration data.
Instead have them in a separate directory under /usr/share which is
included in the zabbix_agentd configuration by default. This also better
follows the FHS.

Hopefully these changes make sense on their own, as well as helping the
CI accept the changes.

Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
This commit is contained in:
Daniel F. Dickinson authored and Josef Schlehofer committed 2026-07-23 01:04:06 +02:00
1 parent 9058162e11
commit 2616169cd4
8 files changed
+9 -6

No files matched your search

+7 -5
View File
@@ -446,7 +446,7 @@ ifdef CONFIG_PACKAGE_zabbix-extra-mac80211
define Build/Prepare
$(call Build/Prepare/Default)
mkdir -p $(PKG_BUILD_DIR)/zabbix-extra-mac80211
$(CP) ./files/zabbix_helper_mac80211.c $(PKG_BUILD_DIR)/zabbix-extra-mac80211/
$(CP) ./src-extra/zabbix_helper_mac80211.c $(PKG_BUILD_DIR)/zabbix-extra-mac80211/
endef
define Build/Configure
@@ -486,8 +486,8 @@ define Package/zabbix/install/init.d
endef
define Package/zabbix/install/zabbix.conf.d
$(INSTALL_DIR) $(1)/etc/zabbix_agentd.conf.d
$(INSTALL_BIN) ./files/$(2) $(1)/etc/zabbix_agentd.conf.d/$(2)
$(INSTALL_DIR) $(1)/usr/share/zabbix_agentd.openwrt-params.d
$(INSTALL_DATA) ./files/usr/share/zabbix_agentd.openwrt-params.d/$(2) $(1)/usr/share/zabbix_agentd.openwrt-params.d/$(2)
endef
define Package/zabbix-agentd/conffiles
@@ -497,6 +497,7 @@ endef
define Package/zabbix-agentd/install
$(INSTALL_DIR) $(1)/etc/zabbix_agentd.conf.d
$(INSTALL_DIR) $(1)/usr/share/zabbix_agentd.openwrt-params.d
$(call Package/zabbix/install/sbin,$(1),agentd)
$(call Package/zabbix/install/etc,$(1),agentd)
$(call Package/zabbix/install/init.d,$(1),agentd)
@@ -509,6 +510,7 @@ endef
define Package/zabbix-agentd-basic/install
$(INSTALL_DIR) $(1)/etc/zabbix_agentd.conf.d
$(INSTALL_DIR) $(1)/usr/share/zabbix_agentd.openwrt-params.d
$(call Package/zabbix/install/sbin,$(1),agentd)
$(call Package/zabbix/install/etc,$(1),agentd)
$(call Package/zabbix/install/init.d,$(1),agentd)
@@ -580,7 +582,7 @@ endef
define Package/zabbix-extra-network/install
$(call Package/zabbix/install/zabbix.conf.d,$(1),network)
$(INSTALL_DIR) $(1)/usr/share/acl.d
$(INSTALL_DATA) ./files/zabbix-network-ubus-acl.json $(1)/usr/share/acl.d/zabbix-network.json
$(INSTALL_DATA) ./files/usr/share/acl.d/zabbix-network-ubus-acl.json $(1)/usr/share/acl.d/zabbix-network.json
endef
define Package/zabbix-extra-network/postinst
@@ -593,7 +595,7 @@ endef
define Package/zabbix-extra-wifi/install
$(call Package/zabbix/install/zabbix.conf.d,$(1),wifi)
$(INSTALL_DIR) $(1)/usr/share/acl.d
$(INSTALL_DATA) ./files/zabbix-wifi-ubus-acl.json $(1)/usr/share/acl.d/zabbix-wifi.json
$(INSTALL_DATA) ./files/usr/share/acl.d/zabbix-wifi-ubus-acl.json $(1)/usr/share/acl.d/zabbix-wifi.json
endef
define Package/zabbix-extra-wifi/postinst
@@ -83,10 +83,11 @@ Signed-off-by: Daniel F. Dickinson <dfdpublic@wildtechgarden.ca>
####### USER-DEFINED MONITORED PARAMETERS #######
@@ -547,5 +541,5 @@ Hostname=Zabbix server
@@ -547,5 +541,6 @@ Hostname=Zabbix server
# Include=
# Include=/usr/local/etc/zabbix_agentd.userparams.conf
-# Include=/usr/local/etc/zabbix_agentd.conf.d/
# Include=/usr/local/etc/zabbix_agentd.conf.d/*.conf
+Include=/usr/share/zabbix_agentd.openwrt-params.d/
+Include=/etc/zabbix_agentd.conf.d/