summaryrefslogtreecommitdiffstats
path: root/netdata-installer.sh
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <austin@netdata.cloud>2023-03-13 07:35:07 -0400
committerGitHub <noreply@github.com>2023-03-13 07:35:07 -0400
commitcd8c7a26b6dbbbc3da6b603e0c6e2c50439ff598 (patch)
tree222c9e8fe94d613239da9c0eb9f040b65d57a9af /netdata-installer.sh
parentbb3cbfcb41505b3cd77abccdecfe548f8ebd0f7f (diff)
Add Amazon Linux 2 to CI and platform support. (#14599)
* Add Amazon Linux 2 to CI and platform support. * Fix conditional in repoconfig spec file. * Fix package testing script. * Add support to kickstart.sh. * Fix pkg-test.sh typo. * Fix CI support package handling. * Make updater log to stderr if running under CI. * Fix broken sed expressions in installer. * Fix updater CI check WRT auto-update checking. * Update .github/scripts/pkg-test.sh Co-authored-by: Tasos Katsoulas <12612986+tkatsoulas@users.noreply.github.com> * Clean up package testing code. * Fix filename matching for package testing. --------- Co-authored-by: Tasos Katsoulas <12612986+tkatsoulas@users.noreply.github.com>
Diffstat (limited to 'netdata-installer.sh')
-rwxr-xr-xnetdata-installer.sh11
1 files changed, 6 insertions, 5 deletions
diff --git a/netdata-installer.sh b/netdata-installer.sh
index 44741d6011..e928c71092 100755
--- a/netdata-installer.sh
+++ b/netdata-installer.sh
@@ -1018,13 +1018,14 @@ if [ ! -f "${NETDATA_PREFIX}/etc/netdata/.installer-cleanup-of-stock-configs-don
(find -L "${NETDATA_PREFIX}/etc/netdata" -type f -not -path '*/\.*' -not -path "${NETDATA_PREFIX}/etc/netdata/orig/*" \( -name '*.conf.old' -o -name '*.conf' -o -name '*.conf.orig' -o -name '*.conf.installer_backup.*' \)) | while IFS= read -r x; do
if [ -f "${x}" ]; then
# find it relative filename
- f=$("$x" | sed "${NETDATA_PREFIX}/etc/netdata/")
+ p="$(echo "${NETDATA_PREFIX}/etc/netdata" | sed -e 's/\//\\\//')"
+ f="$(echo "${x}" | sed -e "s/${p}//")"
# find the stock filename
- t=$("${f}" | sed ".conf.installer_backup.*/.conf")
- t=$("${t}" | sed ".conf.old/.conf")
- t=$("${t}" | sed ".conf.orig/.conf")
- t=$("${t}" | sed "orig//")
+ t="$(echo "${f}" | sed -e 's/\.conf\.installer_backup\..*/\.conf/')"
+ t="$(echo "${t}" | sed -e 's/\.conf\.old/\.conf/')"
+ t="$(echo "${t}" | sed -e 's/\.conf\.orig/\.conf/')"
+ t="$(echo "${t}" | sed -e 's/orig//')"
if [ -z "${md5sum}" ] || [ ! -x "${md5sum}" ]; then
# we don't have md5sum - keep it