# ChangeLog for app-antivirus/clamav
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/ChangeLog,v 1.112 2005/09/18 07:07:04 corsair Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/ChangeLog,v 1.113 2005/09/29 11:54:42 ticho Exp $
+
+ 29 Sep 2005; Andrej Kacian <ticho@gentoo.org> files/clamd.rc,
+ files/clamd.rc.new, clamav-0.86.2.ebuild:
+ Improved config parsing from within the initscript, thanks to Georgi
+ Georgiev <chutz at gg3.net>, bug #107362.
18 Sep 2005; Markus Rothe <corsair@gentoo.org> clamav-0.87.ebuild:
Stable on ppc64 (bug #106279)
-MD5 d9daaf11e516ab49d99e98fac4bf4dc4 ChangeLog 19924
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA1
+
MD5 83a63937082d0c3288058b7b3246db19 clamav-0.87.ebuild 3689
+MD5 61c732b815d6224b12e0ce8d9b61278f clamav-0.86.2.ebuild 3685
+MD5 111ba2a6d65610580fe41b2dddec3988 ChangeLog 20146
MD5 7e32edfd72887a57b16ecd73f0f7a1a0 metadata.xml 184
-MD5 0a6b99afacc591544e87d3e8bf8d7c93 clamav-0.86.2.ebuild 3689
MD5 08f7b320461c04bbb88555e389c2e544 files/clamav-milter.README.gentoo 1124
-MD5 e29ee77ca9bfe28ed18dbf67a9c90e75 files/clamd.conf 193
-MD5 1b3268d3723e003ad99bf706e6bf4312 files/clamd.rc 1444
-MD5 f6bf5b894e60e8686cb5a36ba240e1ef files/clamd.rc.new 2032
-MD5 17e487f0452933ea8ab559a404329cf2 files/digest-clamav-0.87 64
MD5 8365b1166d97452566de3f0f5140ab43 files/digest-clamav-0.86.2 66
+MD5 17e487f0452933ea8ab559a404329cf2 files/digest-clamav-0.87 64
+MD5 9b6f44bf151d0091e67a26007bf08255 files/clamd.rc.new 2037
+MD5 e29ee77ca9bfe28ed18dbf67a9c90e75 files/clamd.conf 193
+MD5 57ccf69fd65dfbb62e50aa0b27b29754 files/clamd.rc 2028
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.2 (GNU/Linux)
+
+iD8DBQFDO9YdQlM6RnzZP+IRAvs2AJ0bCT2thV12zMTZSBaAz1LEJdCTwQCeKgsr
+rLGDpp7qLKA32ibi38XhdT4=
+=S+9v
+-----END PGP SIGNATURE-----
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/clamav-0.86.2.ebuild,v 1.12 2005/09/16 12:53:30 lcars Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/clamav-0.86.2.ebuild,v 1.13 2005/09/29 11:54:42 ticho Exp $
inherit eutils flag-o-matic fixheadtails
make DESTDIR=${D} install || die
dodoc AUTHORS BUGS NEWS README ChangeLog FAQ INSTALL
newconfd ${FILESDIR}/clamd.conf clamd
- newinitd ${FILESDIR}/clamd.rc.new clamd
+ newinitd ${FILESDIR}/clamd.rc clamd
dodoc ${FILESDIR}/clamav-milter.README.gentoo
dodir /var/run/clamav
#!/sbin/runscript
-# Copyright 1999-2004 Gentoo Foundation
+# 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.6 2005/01/27 08:39:02 ticho Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/files/clamd.rc,v 1.7 2005/09/29 11:54:42 ticho Exp $
depend() {
use net
}
start() {
+ local clamd_socket=`grep ^LocalSocket /etc/clamd.conf | cut -d\ -f 2`
if [ "${START_CLAMD}" = "yes" ]; then
- if [ -S "/tmp/clamd" ]; then
- rm -f /tmp/clamd
- fi
- if [ -n "${CLAMD_LOG}" -a ! -f "${CLAMD_LOG}" ]; then
- touch "${CLAMD_LOG}"
- chown clamav:clamav "${CLAMD_LOG}"
- CLAMD_OPTS="${CLAMD_OPTS}${CLAMD_LOG}"
+ if [ -S "${clamd_socket:-/tmp/clamd}" ]; then
+ rm -f ${clamd_socket:-/tmp/clamd}
fi
ebegin "Starting clamd"
start-stop-daemon --start --quiet \
- --exec /usr/sbin/clamd -- ${CLAMD_OPTS}
+ --exec /usr/sbin/clamd
eend $? "Failed to start clamd"
fi
if [ "${START_FRESHCLAM}" = "yes" ]; then
- if [ -n "${FRESHCLAM_LOG}" ]; then
- if [ ! -f "${FRESHCLAM_LOG}" ]; then
- touch "${FRESHCLAM_LOG}"
- chown clamav:clamav "${FRESHCLAM_LOG}"
- fi
- FRESHCLAM_OPTS="${FRESHCLAM_OPTS} -l ${FRESHCLAM_LOG}"
- fi
ebegin "Starting freshclam"
start-stop-daemon --start --quiet \
- --exec /usr/bin/freshclam -- ${FRESHCLAM_OPTS}
- eend $? "Failed to start freshclam"
+ --exec /usr/bin/freshclam -- -d
+ retcode=$?
+ if [ ${retcode} = 1 ]; then
+ eend 0
+ einfo "Virus databases are already up to date."
+ else
+ eend ${retcode} "Failed to start freshclam"
+ fi
+ fi
+ if [ "${START_MILTER}" = "yes" ]; then
+ if [ -S "${MILTER_SOCKET}" ]; then
+ rm -f ${MILTER_SOCKET}
+ fi
+
+ local logfile=`grep -e "^LogFile" /etc/clamd.conf | cut -d\ -f 2`
+ local clamav_user=`grep -e "^User" /etc/clamd.conf | cut -d\ -f 2`
+ if [[ -n "${logfile}" && -n "${clamav_user}" ]]; then
+ if [ ! -f "${logfile}" ]; then
+ touch ${logfile}
+ fi
+ chown ${clamav_user} ${logfile}
+ fi
+
+ ebegin "Starting clamav-milter"
+ start-stop-daemon --start --quiet \
+ --exec /usr/sbin/clamav-milter -- ${MILTER_OPTS} ${MILTER_SOCKET}
+ eend $? "Failed to start clamav-milter"
fi
}
start-stop-daemon --stop --quiet --name freshclam
eend $? "Failed to stop freshclam"
fi
+ if [ "${START_MILTER}" = "yes" ]; then
+ ebegin "Stopping clamav-milter"
+ start-stop-daemon --stop --quiet --name clamav-milter
+ eend $? "Failed to stop clamav-milter"
+ fi
}
#!/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.new,v 1.3 2005/05/24 02:01:36 ticho Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/files/clamd.rc.new,v 1.4 2005/09/29 11:54:42 ticho Exp $
depend() {
use net
}
start() {
- local clamd_socket=`grep ^LocalSocket /etc/clamd.conf | cut -d\ -f 2`
+ local clamd_socket=`awk '$1 == "LocalSocket" { print $2 }' /etc/clamd.conf`
if [ "${START_CLAMD}" = "yes" ]; then
if [ -S "${clamd_socket:-/tmp/clamd}" ]; then
rm -f ${clamd_socket:-/tmp/clamd}
rm -f ${MILTER_SOCKET}
fi
- local logfile=`grep -e "^LogFile" /etc/clamd.conf | cut -d\ -f 2`
- local clamav_user=`grep -e "^User" /etc/clamd.conf | cut -d\ -f 2`
+ local logfile=`awk '$1 == "LogFile" { print $2 }' /etc/clamd.conf`
+ local clamav_user=`awk '$1 == "User" { print $2 }' /etc/clamd.conf`
if [[ -n "${logfile}" && -n "${clamav_user}" ]]; then
if [ ! -f "${logfile}" ]; then
touch ${logfile}