From ac3a6a319fc2176e2c7cb7eca6c6493d476c6c53 Mon Sep 17 00:00:00 2001 From: Roman Korynkevych Date: Tue, 16 May 2017 15:26:36 +0100 Subject: makefile: update collectd Makefile with intel_pmu configuration Update Makefile with intel_pmu collectd plugin required capabilities and environment variables set. Change-Id: Ifd9f53f4f87ea802ff280a611831f1dc8e2fb177 Signed-off-by: Roman Korynkevych --- src/collectd/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/collectd') diff --git a/src/collectd/Makefile b/src/collectd/Makefile index 9e4b484c..8fd78940 100644 --- a/src/collectd/Makefile +++ b/src/collectd/Makefile @@ -34,6 +34,10 @@ ifeq ($(LIBPQOS_DIR),) LIBPQOS_DIR = /usr endif +XDG_CACHE_HOME_DIR = $(shell echo $$XDG_CACHE_HOME) +ifeq ($(XDG_CACHE_HOME_DIR),) +XDG_CACHE_HOME_DIR = $(shell echo $$HOME) +endif CONFIG_CMD += --enable-syslog CONFIG_CMD += --enable-logfile @@ -66,7 +70,8 @@ force_install: $(AT)cp $(WORK_DIR)/contrib/systemd.collectd.service /etc/systemd/system/ $(AT)mv /etc/systemd/system/systemd.collectd.service /etc/systemd/system/collectd.service $(AT)sed -i -e 's/ExecStart=\/usr\/sbin\/collectd/ExecStart=\/opt\/collectd\/sbin\/collectd/g' /etc/systemd/system/collectd.service - $(AT)sed -i -e 's/CapabilityBoundingSet=/CapabilityBoundingSet=CAP_SETUID CAP_SETGID CAP_SYS_RAWIO/g' /etc/systemd/system/collectd.service + $(AT)sed -i -e 's/CapabilityBoundingSet=/CapabilityBoundingSet=CAP_SETUID CAP_SETGID CAP_SYS_RAWIO CAP_SYS_ADMIN/g' /etc/systemd/system/collectd.service + $(AT)sed -i -e 's|Environment=\(.*\)|Environment=XDG_CACHE_HOME='$(XDG_CACHE_HOME_DIR)' \1|g' /etc/systemd/system/collectd.service $(AT)systemctl daemon-reload $(AT)sudo ./include_config.sh @echo "Make install done" -- cgit 1.2.3-korg