Date: Mon, 16 Jun 2008 22:50:43 +1000 (EST) From: Adrian Thearle <adrian@thearle.com.au> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/124643: Clamav-milter rc script does not wait for the milter socket to exist before chmoding it Message-ID: <20080616125043.6E55111477@albert.thearle.com.au> Resent-Message-ID: <200806161300.m5GD03QJ054457@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 124643 >Category: ports >Synopsis: Clamav-milter rc script does not wait for the milter socket to exist before chmoding it >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Jun 16 13:00:03 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Adrian Thearle >Release: FreeBSD 7.0-RELEASE-p1 i386 >Organization: >Environment: System: FreeBSD albert.thearle.com.au 7.0-RELEASE-p1 FreeBSD 7.0-RELEASE-p1 #0: Fri Jun 6 18:37:47 EST 2008 adrian@albert.test.com:/usr/obj/usr/src/sys/AdriansKernel i386 >Description: The startup script throws this error when starting up: chmod: /var/run/clamav/clmilter.sock: No such file or directory. I have added this patch to wait for the socket to exist before trying to chmod. >How-To-Repeat: >Fix: --- patchfile begins here --- Index: clamav-milter.in =================================================================== --- clamav-milter.in (revision 111) +++ clamav-milter.in (working copy) @@ -59,6 +59,22 @@ start_postcmd() { + echo -n "Waiting for clamav-milter socket.. " + i=${clamav_milter_socktimeout} + while [ $i -ne 0 ] + do + [ -S "$clamav_milter_socket" ] && break + if [ `expr $i % 10` -eq 0 ]; then + echo -n "${i}.. " + fi + sleep 1 + i=$(($i-1)) + done + echo + if [ $i -eq 0 ]; then + echo "There is no clamav-milter socket (${clamav_clamd_socket})!" + exit 1 + fi /bin/chmod ${clamav_milter_socket_mode} ${clamav_milter_socket} } --- patchfile ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080616125043.6E55111477>