@cryptotaxi247 / netdata-1 / commits / c16181cb6

netdata/packaging/ci: Make timeout usage more cross-distro compliant (#5938)

* netdata/packaging/ci: #5935 - Make timeout usage more cross-distro compliant * netdata/collectors: use existing system info variable NETDATA_SYSTEM_OS_ID

Paul Emm. Katsoulakis committed May 2, 2019 at 16:59 UTC c16181cb6466edfed64c58c1d734529090d2c0bc
1 file changed +8 -1
collectors/charts.d.plugin/charts.d.plugin.in
+8 -1
@@ -281,7 +281,14 @@ run() {
281 if [ "z${1}" = "z-t" -a "${2}" != "0" ]; then
282 t="${2}"
283 shift 2
284 - timeout ${t} "${@}" 2>"${TMP_DIR}/run.${pid}"
284 + case "${NETDATA_SYSTEM_OS_ID}" in
285 + "alpine")
286 + timeout -t ${t} "${@}" 2>"${TMP_DIR}/run.${pid}"
287 + ;;
288 + *)
289 + timeout ${t} "${@}" 2>"${TMP_DIR}/run.${pid}"
290 + ;;
291 + esac
292 ret=$?
293 else
294 "${@}" 2>"${TMP_DIR}/run.${pid}"