aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Pascal de Bruijn <p.debruijn@unilogic.nl>2020-03-11 15:13:11 +0100
committerGravatar Peter Korsgaard <peter@korsgaard.com>2020-04-07 18:07:40 +0200
commit0c479e9f2b6877fef68cb3a42758e37f36fb787d (patch)
tree1a37a8bf39f3645559eb8536c30e7050ba1e16f4
parentc9c36c519c3d27398320958751c2c7c21d893d14 (diff)
downloadbuildroot-0c479e9f2b6877fef68cb3a42758e37f36fb787d.tar.gz
buildroot-0c479e9f2b6877fef68cb3a42758e37f36fb787d.tar.bz2
package/collectd: keep postgresql_default.conf when needed
$(TARGET_DIR)/usr/share/collectd/postgresql_default.conf should not be removed when postgresql support is enabled, as that module tries to load that file by default. Signed-off-by: Pascal de Bruijn <p.debruijn@unilogic.nl> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> (cherry picked from commit 35e845700fb15b4ab30678c073300b508db4eb95) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rw-r--r--package/collectd/collectd.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/package/collectd/collectd.mk b/package/collectd/collectd.mk
index 6cb040ab18..4828d6af79 100644
--- a/package/collectd/collectd.mk
+++ b/package/collectd/collectd.mk
@@ -198,8 +198,14 @@ endif
define COLLECTD_INSTALL_TARGET_CMDS
$(TARGET_MAKE_ENV) $(MAKE) DESTDIR=$(TARGET_DIR) -C $(@D) install
rm -f $(TARGET_DIR)/usr/bin/collectd-nagios
+endef
+
+ifeq ($(BR2_PACKAGE_COLLECTD_POSTGRESQL),)
+define COLLECTD_REMOVE_UNNEEDED_POSTGRESQL_DEFAULT_CONF
rm -f $(TARGET_DIR)/usr/share/collectd/postgresql_default.conf
endef
+COLLECTD_POST_INSTALL_TARGET_HOOKS += COLLECTD_REMOVE_UNNEEDED_POSTGRESQL_DEFAULT_CONF
+endif
define COLLECTD_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 644 package/collectd/collectd.service \