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:27 +0200
commitb7b4788b66f2c105e339d74c37c74e8a8da07d76 (patch)
treecd95b01401ef18ee499f3de925c4b80770b13702
parent79937f713493a819377129a9c403cbb459ec4534 (diff)
downloadbuildroot-b7b4788b66f2c105e339d74c37c74e8a8da07d76.tar.gz
buildroot-b7b4788b66f2c105e339d74c37c74e8a8da07d76.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 9ff29fcbea..796799b352 100644
--- a/package/collectd/collectd.mk
+++ b/package/collectd/collectd.mk
@@ -223,8 +223,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 \