add sbindir_POST to PATH of bash scripts that use `systemd-cat-native` (#16456)
* use sbindir_POST in charts.d and alarm-notify * convert cgroup-name.sh to in * convert cgroup-network-helper.sh to in * simplify cgroup-network-helper
Ilya Mashchenko committed
Nov 22, 2023 at 22:14 UTC
ae733dd494a1f497f5d6bdd0dd1e237f71e91cd9
6 files changed
+16
-3
.gitignore
+2
@@ -144,6 +144,8 @@ daemon/get-kubernetes-labels.sh
144
145
health/notifications/alarm-notify.sh
146
claim/netdata-claim.sh
147
+collectors/cgroups.plugin/cgroup-name.sh
148
+collectors/cgroups.plugin/cgroup-network-helper.sh
149
collectors/tc.plugin/tc-qos-helper.sh
150
collectors/charts.d.plugin/charts.d.plugin
151
collectors/python.d.plugin/python.d.plugin
collectors/cgroups.plugin/Makefile.am
+10
@@ -3,11 +3,21 @@
3
AUTOMAKE_OPTIONS = subdir-objects
4
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
5
6
+CLEANFILES = \
7
+ cgroup-name.sh \
8
+ cgroup-network-helper.sh \
9
+ $(NULL)
10
+
11
+include $(top_srcdir)/build/subst.inc
12
+SUFFIXES = .in
13
+
14
dist_plugins_SCRIPTS = \
15
cgroup-name.sh \
16
cgroup-network-helper.sh \
17
$(NULL)
18
19
dist_noinst_DATA = \
20
+ cgroup-name.sh.in \
21
+ cgroup-network-helper.sh.in \
22
README.md \
23
$(NULL)
collectors/cgroups.plugin/cgroup-name.sh.in
renamed
+1
-1
@@ -9,7 +9,7 @@
9
# Script to find a better name for cgroups
10
#
11
12
-export PATH="${PATH}:/sbin:/usr/sbin:/usr/local/sbin"
12
+export PATH="${PATH}:/sbin:/usr/sbin:/usr/local/sbin:@sbindir_POST@"
13
export LC_ALL=C
14
15
cmd_line="'${0}' $(printf "'%s' " "${@}")"
collectors/cgroups.plugin/cgroup-network-helper.sh.in
renamed
+1
@@ -26,6 +26,7 @@
26
# the system path is cleared by cgroup-network
27
# shellcheck source=/dev/null
28
[ -f /etc/profile ] && source /etc/profile
29
+export PATH="${PATH}:@sbindir_POST@"
30
31
export LC_ALL=C
32
collectors/charts.d.plugin/charts.d.plugin.in
+1
-1
@@ -13,7 +13,7 @@
13
# each will have a different config file and modules configuration directory.
14
#
15
16
-export PATH="${PATH}:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin"
16
+export PATH="${PATH}:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin:@sbindir_POST@"
17
18
PROGRAM_FILE="$0"
19
MODULE_NAME="main"
health/notifications/alarm-notify.sh.in
+1
-1
@@ -76,7 +76,7 @@ if { [ "${1}" = "test" ] || [ "${2}" = "test" ]; } && [ "${#}" -le 2 ]; then
76
exit $test_res
77
fi
78
79
-export PATH="${PATH}:/sbin:/usr/sbin:/usr/local/sbin"
79
+export PATH="${PATH}:/sbin:/usr/sbin:/usr/local/sbin:@sbindir_POST@"
80
export LC_ALL=C
81
82
# -----------------------------------------------------------------------------