Make sure clamav-milter starts correctly when --external option is used. Patch submit...
authorAndrej Kacian <ticho@gentoo.org>
Tue, 10 Apr 2007 20:13:39 +0000 (20:13 +0000)
committerAndrej Kacian <ticho@gentoo.org>
Tue, 10 Apr 2007 20:13:39 +0000 (20:13 +0000)
Package-Manager: portage-2.1.2.3

app-antivirus/clamav/ChangeLog
app-antivirus/clamav/Manifest
app-antivirus/clamav/files/clamd.rc

index 3f7666fd51c3b2613f7e3d4b0bf069ddb8c9a406..4c5f25759ab07f9aa62a75dfce7fb459cc1f38b9 100644 (file)
@@ -1,6 +1,10 @@
 # ChangeLog for app-antivirus/clamav
 # Copyright 2002-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/ChangeLog,v 1.219 2007/04/02 11:40:22 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/ChangeLog,v 1.220 2007/04/10 20:13:39 ticho Exp $
+
+  10 Apr 2007; Andrej Kacian <ticho@gentoo.org> files/clamd.rc:
+  Make sure clamav-milter starts correctly when --external option is used.
+  Patch submitted by Dean C Bullock <dean at bullock.net> in bug #169561.
 
   02 Apr 2007; Roy Marples <uberlord@gentoo.org> files/clamd.rc:
   De bashify init script.
index a92609daf820abb30b22bc8be34769d7a535a1ff..2c427b6b76756701ec3c9831723e64acbd9fe1e4 100644 (file)
@@ -1,3 +1,6 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
 AUX clamav-0.90-compat.patch 585 RMD160 3ee74f163bd8b4440f06773ec7abe3bcec1fff79 SHA1 fedfe373a6a911230c553fd5a095c8acb72b4ce2 SHA256 7a646386f74bc9094bd39d6762b78ef74310678cdef5484650e0aa242cf570e9
 MD5 6c50cdabc6ee6dc40df2b89c075380a5 files/clamav-0.90-compat.patch 585
 RMD160 3ee74f163bd8b4440f06773ec7abe3bcec1fff79 files/clamav-0.90-compat.patch 585
@@ -18,10 +21,10 @@ AUX clamd.conf 193 RMD160 abebb5e1607e6819859b51e1a41b583c8266c6df SHA1 5b27737a
 MD5 e29ee77ca9bfe28ed18dbf67a9c90e75 files/clamd.conf 193
 RMD160 abebb5e1607e6819859b51e1a41b583c8266c6df files/clamd.conf 193
 SHA256 cd867dc66af694282584fa2cfd40a662ac2a7c25d6f2288b9afdc657a07226e3 files/clamd.conf 193
-AUX clamd.rc 2612 RMD160 6866b38dad3bbe3796e5350ca9f1cefdd727b994 SHA1 49147a0a1eff66a06ed00d745f7efa43e0a11ffb SHA256 727280353537d3f0e1e69b2fcb7ea04555e09c87c894e4e90020196b7bebe763
-MD5 a5de4a0c4862bbae6b1c983867272153 files/clamd.rc 2612
-RMD160 6866b38dad3bbe3796e5350ca9f1cefdd727b994 files/clamd.rc 2612
-SHA256 727280353537d3f0e1e69b2fcb7ea04555e09c87c894e4e90020196b7bebe763 files/clamd.rc 2612
+AUX clamd.rc 3476 RMD160 64f487cf526d0472cb4c8bd26ddd1e8efa1c9166 SHA1 cc9e08f58982961d28289a44f09f770cb6b91d95 SHA256 678344f493c7f5c0ab6e5344535baf376c69e84fd8bae693cb2b6dbf5b1ea1b0
+MD5 b24cd44e4171c828631214d3d7e614d2 files/clamd.rc 3476
+RMD160 64f487cf526d0472cb4c8bd26ddd1e8efa1c9166 files/clamd.rc 3476
+SHA256 678344f493c7f5c0ab6e5344535baf376c69e84fd8bae693cb2b6dbf5b1ea1b0 files/clamd.rc 3476
 DIST clamav-0.88.7.tar.gz 9510548 RMD160 14d7c6255df618b16b704fc1cb5ce2b1385fa0e8 SHA1 7d7833dc454437ed7044b1c734f0a13e4dc1ead2 SHA256 702cb5928bff3d0e647a4a6b505d434e3a0f10f2af74bddac5239a200b92d1e2
 DIST clamav-0.90.1.tar.gz 11643310 RMD160 1fd343d6510fea337a676e32bb1e4e404da4bd6d SHA1 d51f279fce2d702c3e97b2e08fe3b4b863f0acc6 SHA256 08a0255b4f6bdc4312eea6c118e79ecf684aed10640b45037d9dc5890c7687be
 DIST clamav-0.90.tar.gz 11575374 RMD160 1b22144d3a41376093b73bbeb5302092a18ca685 SHA1 574b84429b878df3a9d862ea386c970326850158 SHA256 c39005318d4a7d27d9710c3d71396b8c500e0bc5a184cb7392051c9ca9dea60d
@@ -49,10 +52,10 @@ EBUILD clamav-0.90.ebuild 3958 RMD160 acabf30bc728a8edc824d14d7e965b858b324340 S
 MD5 1a6bb4a7e8d417feff74b768aaa216e9 clamav-0.90.ebuild 3958
 RMD160 acabf30bc728a8edc824d14d7e965b858b324340 clamav-0.90.ebuild 3958
 SHA256 ec400f0e7387af9362c5ee2d77cb686a227634f9caf638be381f2094e43b6ace clamav-0.90.ebuild 3958
-MISC ChangeLog 34746 RMD160 41197195c36a4da6eb62dbaddbdfbeaef99f38e9 SHA1 2bf507d22e662fef283bd6f8fd2cb5cd75152ff0 SHA256 6d8e99c8a79903dfaddf38ded27cd705c968880abcd462d5c8bff2cc4d80df07
-MD5 a87ae4cc811a9a3d9e9ca60ff564cd64 ChangeLog 34746
-RMD160 41197195c36a4da6eb62dbaddbdfbeaef99f38e9 ChangeLog 34746
-SHA256 6d8e99c8a79903dfaddf38ded27cd705c968880abcd462d5c8bff2cc4d80df07 ChangeLog 34746
+MISC ChangeLog 34957 RMD160 78253c0c0116105448d20a50ab731f3a154f5888 SHA1 7255939fb75ee65a4fc0bbc4cb8ad5783b4e55d8 SHA256 5c24aba2032c6604d7f90a4fc3c8ea476b7731af8ed2db02c8af5e80ce27460d
+MD5 ce0f7d245e48a5fb86fcef2a9dc6c446 ChangeLog 34957
+RMD160 78253c0c0116105448d20a50ab731f3a154f5888 ChangeLog 34957
+SHA256 5c24aba2032c6604d7f90a4fc3c8ea476b7731af8ed2db02c8af5e80ce27460d ChangeLog 34957
 MISC metadata.xml 184 RMD160 c37bff1fc1cd7139c91dae9b0fa5082e1d81f153 SHA1 cc0a188d9ad2411e78747326c62dd046bd5413c8 SHA256 d51011aa837db802ef539a1321a4af0a4a00879d475b92fd58f3c01df7320b58
 MD5 7e32edfd72887a57b16ecd73f0f7a1a0 metadata.xml 184
 RMD160 c37bff1fc1cd7139c91dae9b0fa5082e1d81f153 metadata.xml 184
@@ -75,3 +78,10 @@ SHA256 be92b57874b8c81e9831142039d6ee58ab3aaf3feae75d26a4a5d1d821a21757 files/di
 MD5 2990615ce8ce0c303dc772558ee52ea4 files/digest-clamav-0.90.1-r1 247
 RMD160 be0e20cdadaa82a58211c754908e439923513e21 files/digest-clamav-0.90.1-r1 247
 SHA256 be92b57874b8c81e9831142039d6ee58ab3aaf3feae75d26a4a5d1d821a21757 files/digest-clamav-0.90.1-r1 247
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.7 (GNU/Linux)
+
+iD8DBQFGG/AAQlM6RnzZP+IRAtV8AJ4p+Bz7Qy4UawNuzmBn11QVvs9l8gCgt4rv
+Q4bSirnnLJZt/VPDkhRdvoU=
+=6Z/5
+-----END PGP SIGNATURE-----
index e2dfbb1a8f4aa7f3e4aa2e33972462e8490077f3..32efa6ae1e9428ae9552a0da90c687386b52182d 100644 (file)
@@ -1,7 +1,7 @@
 #!/sbin/runscript
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/files/clamd.rc,v 1.13 2007/04/02 11:40:22 uberlord Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/files/clamd.rc,v 1.14 2007/04/10 20:13:39 ticho Exp $
 
 opts="logfix"
 
@@ -43,6 +43,47 @@ start() {
                        rm -f ${MILTER_SOCKET}
                fi
 
+
+               local milter_ext=no
+               local milter_svr=no
+               args=`getopt -q --options "es" --longoptions "external,server" --  $MILTER_OPTS`
+               for arg in $args; do
+
+                       case "$arg" in
+
+                       -e | --external)
+                               milter_ext=yes;
+                               shift;;
+
+                       -s | --server)
+                               milter_svr=yes;
+                               shift;;
+
+                       --)
+                               shift;
+                               break;;
+                       esac
+               done
+
+               if [[ $milter_ext == yes && $milter_svr == no ]]; then
+                       local clamd_socket_wait_count=0
+                       local clamd_socket_wait_max=10
+                       local clamd_socket_wait_result=-1
+                       ebegin "Waiting for clamd to create ${clamd_socket}"
+                       while (( clamd_socket_wait < clamd_socket_wait_max )); do
+                               if [ -S "${clamd_socket:-/tmp/clamd}" ]; then
+                                       clamd_socket_wait_result=0
+                                       break
+                               else
+                                       echo -n " ."
+                                       let clamd_socket_wait++
+                                       sleep 1
+                               fi
+                       done
+                       echo
+                       eend $clamd_socket_wait_result "Timeout waiting for ${clamd_socket}"
+               fi
+                       
                ebegin "Starting clamav-milter"
                start-stop-daemon --start --quiet \
                        --exec /usr/sbin/clamav-milter -- ${MILTER_OPTS} ${MILTER_SOCKET}