From 44fc01f0c67354dcf7fba90db84a904a7a7a6343 Mon Sep 17 00:00:00 2001 From: Jackie Huang Date: Fri, 21 May 2021 11:20:05 +0800 Subject: [PATCH] collectd-extensions: update for stx 5.0 * update the do_install according to the spec for stx 5.0 Story: 2008952 Task: 42576 Signed-off-by: Jackie Huang Change-Id: Ia401ca2e693655228cac8fe28e576f2060aed209 --- .../stx-monitoring/collectd-extensions.bb | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/meta-stx-flock/stx-monitoring/collectd-extensions.bb b/meta-stx-flock/stx-monitoring/collectd-extensions.bb index 70d7236..4f0a400 100644 --- a/meta-stx-flock/stx-monitoring/collectd-extensions.bb +++ b/meta-stx-flock/stx-monitoring/collectd-extensions.bb @@ -18,7 +18,8 @@ RDEPENDS_${PN}_append += " \ local_unit_dir = "${sysconfdir}/systemd/system" -local_plugin_dir = "${sysconfdir}/collectd.d" +local_default_plugin_dir = "${sysconfdir}/collectd.d" +local_starlingx_plugin_dir = "${sysconfdir}/collectd.d/starlingx" local_python_extensions_dir = "/opt/collectd/extensions/python" local_config_extensions_dir = "/opt/collectd/extensions/config" @@ -27,7 +28,8 @@ do_install_append() { install -m 755 -d ${D}/${sysconfdir} install -m 755 -d ${D}/${local_unit_dir} - install -m 755 -d ${D}/${local_plugin_dir} + install -m 755 -d ${D}/${local_default_plugin_dir} + install -m 755 -d ${D}/${local_starlingx_plugin_dir} install -m 755 -d ${D}/${local_config_extensions_dir} install -m 755 -d ${D}/${local_python_extensions_dir} @@ -39,10 +41,12 @@ do_install_append() { install -m 700 fm_notifier.py ${D}/${local_python_extensions_dir} install -m 700 plugin_common.py ${D}/${local_python_extensions_dir} + # install README file into /etc/collectd.d + install -m 644 README ${D}/${local_default_plugin_dir} + # collectd python plugin files - resource plugins install -m 700 cpu.py ${D}/${local_python_extensions_dir} install -m 700 memory.py ${D}/${local_python_extensions_dir} - install -m 700 example.py ${D}/${local_python_extensions_dir} install -m 700 ntpq.py ${D}/${local_python_extensions_dir} install -m 700 interface.py ${D}/${local_python_extensions_dir} install -m 700 remotels.py ${D}/${local_python_extensions_dir} @@ -51,16 +55,15 @@ do_install_append() { # collectd plugin conf files into /etc/collectd.d - install -m 600 python_plugins.conf ${D}/${local_plugin_dir} - install -m 600 cpu.conf ${D}/${local_plugin_dir} - install -m 600 memory.conf ${D}/${local_plugin_dir} - install -m 600 df.conf ${D}/${local_plugin_dir} - install -m 600 example.conf ${D}/${local_plugin_dir} - install -m 600 ntpq.conf ${D}/${local_plugin_dir} - install -m 600 interface.conf ${D}/${local_plugin_dir} - install -m 600 remotels.conf ${D}/${local_plugin_dir} - install -m 600 ptp.conf ${D}/${local_plugin_dir} - install -m 600 ovs_interface.conf ${D}/${local_plugin_dir} + install -m 600 python_plugins.conf ${D}/${local_default_plugin_dir} + install -m 600 cpu.conf ${D}/${local_default_plugin_dir} + install -m 600 memory.conf ${D}/${local_default_plugin_dir} + install -m 600 df.conf ${D}/${local_default_plugin_dir} + install -m 600 ntpq.conf ${D}/${local_default_plugin_dir} + install -m 600 interface.conf ${D}/${local_default_plugin_dir} + install -m 600 remotels.conf ${D}/${local_default_plugin_dir} + install -m 600 ptp.conf ${D}/${local_default_plugin_dir} + install -m 600 ovs_interface.conf ${D}/${local_default_plugin_dir} }