diff options
author | Austin S. Hemmelgarn <austin@netdata.cloud> | 2023-05-11 08:20:43 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-11 08:20:43 -0400 |
commit | beb1aa64a74f05732ef2af0c936f22d696d3d76d (patch) | |
tree | 6fc070c8698160ddd6351f1058cb66090839cded /packaging | |
parent | cd228b836130f8499e8fdca6671571fd5cacedd4 (diff) |
Remove old logic for handling of legacy stock config files. (#14829)
Diffstat (limited to 'packaging')
-rwxr-xr-x | packaging/makeself/install-or-update.sh | 43 | ||||
-rwxr-xr-x | packaging/makeself/jobs/99-makeself.install.sh | 1 |
2 files changed, 0 insertions, 44 deletions
diff --git a/packaging/makeself/install-or-update.sh b/packaging/makeself/install-or-update.sh index 03f7c2c7c9..37fb33d7cb 100755 --- a/packaging/makeself/install-or-update.sh +++ b/packaging/makeself/install-or-update.sh @@ -62,45 +62,6 @@ if [ ! "${DISABLE_TELEMETRY:-0}" -eq 0 ] || REINSTALL_OPTIONS="${REINSTALL_OPTIONS} --disable-telemetry" fi -deleted_stock_configs=0 -if [ ! -f "etc/netdata/.installer-cleanup-of-stock-configs-done" ]; then - - # ----------------------------------------------------------------------------- - progress "Deleting stock configuration files from user configuration directory" - - declare -A configs_signatures=() - source "system/configs.signatures" - - if [ ! -d etc/netdata ]; then - run mkdir -p etc/netdata - fi - - md5sum="$(command -v md5sum 2> /dev/null || command -v md5 2> /dev/null)" - while IFS= read -r -d '' x; do - # find it relative filename - f="${x/etc\/netdata\//}" - - # find the stock filename - t="${f/.conf.old/.conf}" - t="${t/.conf.orig/.conf}" - - if [ -n "${md5sum}" ]; then - # find the checksum of the existing file - md5="$(${md5sum} < "${x}" | cut -d ' ' -f 1)" - #echo >&2 "md5: ${md5}" - - # check if it matches - if [ "${configs_signatures[${md5}]}" = "${t}" ]; then - # it matches the default - run rm -f "${x}" - deleted_stock_configs=$((deleted_stock_configs + 1)) - fi - fi - done < <(find etc -type f) - - touch "etc/netdata/.installer-cleanup-of-stock-configs-done" -fi - # ----------------------------------------------------------------------------- progress "Attempt to create user/group netdata/netadata" @@ -196,10 +157,6 @@ dir_should_be_link . var/log/netdata netdata-logs dir_should_be_link etc/netdata ../../usr/lib/netdata/conf.d orig -if [ ${deleted_stock_configs} -gt 0 ]; then - dir_should_be_link etc/netdata ../../usr/lib/netdata/conf.d "000.-.USE.THE.orig.LINK.TO.COPY.AND.EDIT.STOCK.CONFIG.FILES" -fi - # ----------------------------------------------------------------------------- progress "fix permissions" diff --git a/packaging/makeself/jobs/99-makeself.install.sh b/packaging/makeself/jobs/99-makeself.install.sh index 12bd59b661..aa1acd1005 100755 --- a/packaging/makeself/jobs/99-makeself.install.sh +++ b/packaging/makeself/jobs/99-makeself.install.sh @@ -28,7 +28,6 @@ run cp \ packaging/makeself/post-installer.sh \ packaging/makeself/install-or-update.sh \ packaging/installer/functions.sh \ - configs.signatures \ "${NETDATA_INSTALL_PATH}/system/" # ----------------------------------------------------------------------------- |