diff options
author | Andrej Kacian <ticho@gentoo.org> | 2007-04-10 20:13:39 +0000 |
---|---|---|
committer | Andrej Kacian <ticho@gentoo.org> | 2007-04-10 20:13:39 +0000 |
commit | b6a652a019349c7897de71d627f42475066d6149 (patch) | |
tree | 71dbeca4121ee61a7e66fe0f627c050ab3c4a56b /app-antivirus | |
parent | Add patch from Gnome bugzilla to fix parsing. Closes bug #174076, thanks to ... (diff) | |
download | gentoo-2-b6a652a019349c7897de71d627f42475066d6149.tar.gz gentoo-2-b6a652a019349c7897de71d627f42475066d6149.tar.bz2 gentoo-2-b6a652a019349c7897de71d627f42475066d6149.zip |
Make sure clamav-milter starts correctly when --external option is used. Patch submitted by Dean C Bullock <dean at bullock.net> in bug #169561.
(Portage version: 2.1.2.3)
Diffstat (limited to 'app-antivirus')
-rw-r--r-- | app-antivirus/clamav/ChangeLog | 6 | ||||
-rw-r--r-- | app-antivirus/clamav/files/clamd.rc | 43 |
2 files changed, 47 insertions, 2 deletions
diff --git a/app-antivirus/clamav/ChangeLog b/app-antivirus/clamav/ChangeLog index 3f7666fd51c3..4c5f25759ab0 100644 --- a/app-antivirus/clamav/ChangeLog +++ b/app-antivirus/clamav/ChangeLog @@ -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. diff --git a/app-antivirus/clamav/files/clamd.rc b/app-antivirus/clamav/files/clamd.rc index e2dfbb1a8f4a..32efa6ae1e94 100644 --- a/app-antivirus/clamav/files/clamd.rc +++ b/app-antivirus/clamav/files/clamd.rc @@ -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} |