From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Jun 16 13:00:06 2008 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C27431065679 for ; Mon, 16 Jun 2008 13:00:06 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D8C328FC28 for ; Mon, 16 Jun 2008 13:00:03 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m5GD03dW054458 for ; Mon, 16 Jun 2008 13:00:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m5GD03QJ054457; Mon, 16 Jun 2008 13:00:03 GMT (envelope-from gnats) Resent-Date: Mon, 16 Jun 2008 13:00:03 GMT Resent-Message-Id: <200806161300.m5GD03QJ054457@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Adrian Thearle Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D05C9106567E for ; Mon, 16 Jun 2008 12:50:44 +0000 (UTC) (envelope-from root@thearle.com.au) Received: from albert.thearle.com.au (albert.thearle.com.au [150.101.115.54]) by mx1.freebsd.org (Postfix) with ESMTP id 927D38FC2C for ; Mon, 16 Jun 2008 12:50:44 +0000 (UTC) (envelope-from root@thearle.com.au) Received: by albert.thearle.com.au (Postfix, from userid 0) id 6E55111477; Mon, 16 Jun 2008 22:50:43 +1000 (EST) Message-Id: <20080616125043.6E55111477@albert.thearle.com.au> Date: Mon, 16 Jun 2008 22:50:43 +1000 (EST) From: Adrian Thearle To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: ports/124643: Clamav-milter rc script does not wait for the milter socket to exist before chmoding it X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Adrian Thearle List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jun 2008 13:00:06 -0000 >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: