summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrej Kacian <ticho@gentoo.org>2005-09-29 11:54:42 +0000
committerAndrej Kacian <ticho@gentoo.org>2005-09-29 11:54:42 +0000
commitb30be5efe2273264cdfb53b03746eb21db17a906 (patch)
tree5534a0909bcfdde5d1b168271432f5d0c2457dd9 /app-antivirus
parentVersion bump. (diff)
downloadhistorical-b30be5efe2273264cdfb53b03746eb21db17a906.tar.gz
historical-b30be5efe2273264cdfb53b03746eb21db17a906.tar.bz2
historical-b30be5efe2273264cdfb53b03746eb21db17a906.zip
Improved config parsing from within the initscript, thanks to Georgi Georgiev <chutz at gg3.net>, bug #107362.
Package-Manager: portage-2.0.52-r1
Diffstat (limited to 'app-antivirus')
-rw-r--r--app-antivirus/clamav/ChangeLog7
-rw-r--r--app-antivirus/clamav/Manifest22
-rw-r--r--app-antivirus/clamav/clamav-0.86.2.ebuild4
-rw-r--r--app-antivirus/clamav/files/clamd.rc57
-rw-r--r--app-antivirus/clamav/files/clamd.rc.new8
5 files changed, 66 insertions, 32 deletions
diff --git a/app-antivirus/clamav/ChangeLog b/app-antivirus/clamav/ChangeLog
index 3226bb8c07f8..0b9e30eccf38 100644
--- a/app-antivirus/clamav/ChangeLog
+++ b/app-antivirus/clamav/ChangeLog
@@ -1,6 +1,11 @@
# 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)
diff --git a/app-antivirus/clamav/Manifest b/app-antivirus/clamav/Manifest
index 31cc3a95df4e..cb5f3b1db0c7 100644
--- a/app-antivirus/clamav/Manifest
+++ b/app-antivirus/clamav/Manifest
@@ -1,10 +1,20 @@
-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-----
diff --git a/app-antivirus/clamav/clamav-0.86.2.ebuild b/app-antivirus/clamav/clamav-0.86.2.ebuild
index 25703fc02b11..a2b01c1ad31f 100644
--- a/app-antivirus/clamav/clamav-0.86.2.ebuild
+++ b/app-antivirus/clamav/clamav-0.86.2.ebuild
@@ -1,6 +1,6 @@
# 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
@@ -63,7 +63,7 @@ src_install() {
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
diff --git a/app-antivirus/clamav/files/clamd.rc b/app-antivirus/clamav/files/clamd.rc
index dc0f3b94e9a3..305626ff7d97 100644
--- a/app-antivirus/clamav/files/clamd.rc
+++ b/app-antivirus/clamav/files/clamd.rc
@@ -1,7 +1,7 @@
#!/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
@@ -9,32 +9,46 @@ depend() {
}
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
}
@@ -49,4 +63,9 @@ stop() {
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
}
diff --git a/app-antivirus/clamav/files/clamd.rc.new b/app-antivirus/clamav/files/clamd.rc.new
index a7293710b583..ab8994f63d61 100644
--- a/app-antivirus/clamav/files/clamd.rc.new
+++ b/app-antivirus/clamav/files/clamd.rc.new
@@ -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.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
@@ -9,7 +9,7 @@ depend() {
}
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}
@@ -36,8 +36,8 @@ start() {
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}