diff options
author | Paweł Krupa <pawel@krupa.net.pl> | 2019-01-20 20:43:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-20 20:43:39 +0100 |
commit | 47a74dc941ff94930d455183f931924f8bc58a2b (patch) | |
tree | 6feba1633eadf4ee46312fbb5499961cfee209fc /packaging/installer/netdata-updater.sh | |
parent | 0b56965338042720f8a6fb0a69eeb88553e524f0 (diff) |
Fix nightly builds and cron autoupdater (#5232)
* add gating before using polyverse
* workaround for installations which doesn't use newer installer
* fix #5225; #5229; #5228; #5208
Diffstat (limited to 'packaging/installer/netdata-updater.sh')
-rw-r--r-- | packaging/installer/netdata-updater.sh | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/packaging/installer/netdata-updater.sh b/packaging/installer/netdata-updater.sh index dba02f76ca..96f7c12704 100644 --- a/packaging/installer/netdata-updater.sh +++ b/packaging/installer/netdata-updater.sh @@ -71,7 +71,14 @@ failed() { update() { [ -z "${tmp}" ] && info "Running on a terminal - (this script also supports running headless from crontab)" - dir=$(mktemp -d) + # Check if tmp is mounted as noexec + if grep -Eq '^[^ ]+ /tmp [^ ]+ ([^ ]*,)?noexec[, ]' /proc/mounts; then + pattern="/opt/netdata-updater-XXXXXX" + else + pattern="/tmp/netdata-updater-XXXXXX" + fi + + dir=$(mktemp -d "$pattern") cd "$dir" |