aboutsummaryrefslogtreecommitdiffstats
path: root/src/collectd
diff options
context:
space:
mode:
authorRoman Korynkevych <romanx.korynkevych@intel.com>2017-05-16 15:26:36 +0100
committerRoman Korynkevych <romanx.korynkevych@intel.com>2017-05-16 15:26:36 +0100
commitac3a6a319fc2176e2c7cb7eca6c6493d476c6c53 (patch)
tree088770f23267c2d79f9dc35c0037c1cafe7a81cb /src/collectd
parent4e65c884d5863c3737d819dde75edd0f037bba6a (diff)
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 <romanx.korynkevych@intel.com>
Diffstat (limited to 'src/collectd')
-rw-r--r--src/collectd/Makefile7
1 files changed, 6 insertions, 1 deletions
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"