clamav-notify-server: fixed compatibility with RHEL6 coreutils

This commit is contained in:
Enrico Scholz 2012-01-24 13:02:14 +01:00 committed by Enrico Scholz
parent eed51b8ded
commit dda88bd5f3
1 changed files with 4 additions and 1 deletions

View File

@ -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)
;;