From dda88bd5f377f12e6d54c2fbd48332b1683a168f Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Tue, 24 Jan 2012 13:02:14 +0100 Subject: [PATCH] clamav-notify-server: fixed compatibility with RHEL6 coreutils --- clamav-notify-servers | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clamav-notify-servers b/clamav-notify-servers index 8c298aa..4324ec3 100644 --- a/clamav-notify-servers +++ b/clamav-notify-servers @@ -23,6 +23,9 @@ NC=nc TIMEOUT_TERM=30 TIMEOUT_KILL=60 +K_OPT=1 +LANG=C timeout --help | grep -q -- '--kill-after' || unset K_OPT + get_sockets() { ( cd /etc/clamd.d @@ -66,7 +69,7 @@ op_nc() { continue esac - resp=`printf 'zRELOAD\0' | timeout -k $TIMEOUT_KILL $TIMEOUT_TERM "${CMD[@]}"` + resp=`printf 'zRELOAD\0' | timeout ${K_OPT:+-k $TIMEOUT_KILL} $TIMEOUT_TERM "${CMD[@]}"` case $resp in (RELOADING) ;;