diff options
author | Roman I Khimov <khimov@altell.ru> | 2009-09-04 17:37:03 +0400 |
---|---|---|
committer | Roman I Khimov <khimov@altell.ru> | 2010-03-30 21:50:13 +0400 |
commit | 654351c29d60f2d68a648054f8324ce48b8be44d (patch) | |
tree | d6e927a19f1705286a3224a8ccd0923b2b938ec4 /recipes/clamav | |
parent | c5ffbab676b961ecbc7a9e478ba571a8872185ff (diff) |
clamav: wait on stop in init
Takes some time for clamav to shut down and it's better to return from
init script only when it actually is stopped.
Signed-off-by: Roman I Khimov <khimov@altell.ru>
Diffstat (limited to 'recipes/clamav')
-rw-r--r-- | recipes/clamav/clamav.inc | 2 | ||||
-rw-r--r-- | recipes/clamav/files/clamav-daemon.init | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/recipes/clamav/clamav.inc b/recipes/clamav/clamav.inc index 405e3c7c28..b6aa2a29e3 100644 --- a/recipes/clamav/clamav.inc +++ b/recipes/clamav/clamav.inc @@ -18,7 +18,7 @@ RRECOMMENDS_${PN} = "${PN}-freshclam" RRECOMMENDS_${PN}-daemon = "${PN}-freshclam" RPROVIDES_${PN}-freshclam = "${PN}-data" -INC_PR = "r2" +INC_PR = "r3" SRC_URI = "${SOURCEFORGE_MIRROR}/clamav/clamav-${PV}.tar.gz;name=clamav-${PV} \ file://clamav-daemon.init \ diff --git a/recipes/clamav/files/clamav-daemon.init b/recipes/clamav/files/clamav-daemon.init index 6fd07146ea..b506ccadb3 100644 --- a/recipes/clamav/files/clamav-daemon.init +++ b/recipes/clamav/files/clamav-daemon.init @@ -28,6 +28,12 @@ case "$1" in stop) echo -n "Stopping $DESC: " start-stop-daemon -K -p $PID + for i in `seq 1 5`; do + if start-stop-daemon -p $PID -t -K >/dev/null 2>&1; then + break; + fi + sleep 1 + done ;; restart|force-reload) |