1 |
dertobi123 09/06/21 09:46:12 |
2 |
|
3 |
Modified: clamd.rc |
4 |
Log: |
5 |
Version bump, incorporating patches from #273668 by Bernd Lommerzheim, security bug #274510 and fixing milter support (#272039). |
6 |
(Portage version: 2.2_rc33/cvs/Linux x86_64) |
7 |
|
8 |
Revision Changes Path |
9 |
1.17 app-antivirus/clamav/files/clamd.rc |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-antivirus/clamav/files/clamd.rc?rev=1.17&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-antivirus/clamav/files/clamd.rc?rev=1.17&content-type=text/plain |
13 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-antivirus/clamav/files/clamd.rc?r1=1.16&r2=1.17 |
14 |
|
15 |
Index: clamd.rc |
16 |
=================================================================== |
17 |
RCS file: /var/cvsroot/gentoo-x86/app-antivirus/clamav/files/clamd.rc,v |
18 |
retrieving revision 1.16 |
19 |
retrieving revision 1.17 |
20 |
diff -u -r1.16 -r1.17 |
21 |
--- clamd.rc 29 Feb 2008 23:46:46 -0000 1.16 |
22 |
+++ clamd.rc 21 Jun 2009 09:46:12 -0000 1.17 |
23 |
@@ -1,7 +1,7 @@ |
24 |
#!/sbin/runscript |
25 |
# Copyright 1999-2005 Gentoo Foundation |
26 |
# Distributed under the terms of the GNU General Public License v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/files/clamd.rc,v 1.16 2008/02/29 23:46:46 ticho Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/app-antivirus/clamav/files/clamd.rc,v 1.17 2009/06/21 09:46:12 dertobi123 Exp $ |
29 |
|
30 |
opts="logfix" |
31 |
|
32 |
@@ -39,56 +39,16 @@ |
33 |
eend ${retcode} "Failed to start freshclam" |
34 |
fi |
35 |
fi |
36 |
+ |
37 |
if [ "${START_MILTER}" = "yes" ]; then |
38 |
- if [ -S "${MILTER_SOCKET}" ]; then |
39 |
- rm -f ${MILTER_SOCKET} |
40 |
+ if [ -z "${MILTER_CONF_FILE}" ]; then |
41 |
+ MILTER_CONF_FILE="/etc/clamav-milter.conf" |
42 |
fi |
43 |
|
44 |
- |
45 |
- local milter_ext=no |
46 |
- local milter_svr=no |
47 |
- args=`getopt -q --options "es" --longoptions "external,server" -- $MILTER_OPTS` |
48 |
- for arg in $args; do |
49 |
- |
50 |
- case "$arg" in |
51 |
- |
52 |
- -e | --external) |
53 |
- milter_ext=yes; |
54 |
- shift;; |
55 |
- |
56 |
- -s | --server) |
57 |
- milter_svr=yes; |
58 |
- shift;; |
59 |
- |
60 |
- --) |
61 |
- shift; |
62 |
- break;; |
63 |
- esac |
64 |
- done |
65 |
- |
66 |
- if [[ $milter_ext == yes && $milter_svr == no ]]; then |
67 |
- local clamd_socket_wait_count=0 |
68 |
- local clamd_socket_wait_max=10 |
69 |
- local clamd_socket_wait_result=-1 |
70 |
- ebegin "Waiting for clamd to create ${clamd_socket}" |
71 |
- while (( clamd_socket_wait < clamd_socket_wait_max )); do |
72 |
- if [ -S "${clamd_socket:-/tmp/clamd}" ]; then |
73 |
- clamd_socket_wait_result=0 |
74 |
- break |
75 |
- else |
76 |
- echo -n " ." |
77 |
- let clamd_socket_wait++ |
78 |
- sleep 1 |
79 |
- fi |
80 |
- done |
81 |
- echo |
82 |
- eend $clamd_socket_wait_result "Timeout waiting for ${clamd_socket}" |
83 |
- fi |
84 |
- |
85 |
ebegin "Starting clamav-milter" |
86 |
start-stop-daemon --start --quiet \ |
87 |
--nicelevel ${MILTER_NICELEVEL:-0} \ |
88 |
- --exec /usr/sbin/clamav-milter -- ${MILTER_OPTS} ${MILTER_SOCKET} |
89 |
+ --exec /usr/sbin/clamav-milter -- -c ${MILTER_CONF_FILE} |
90 |
eend $? "Failed to start clamav-milter" |
91 |
fi |
92 |
} |