[Pkg-clamav-commits] [SCM] Debian repository for ClamAV branch, debian/unstable, updated. debian/0.94.dfsg.1-1-6-gfb17f7c
Michael Tautschnig
mt at debian.org
Sun Nov 23 14:54:44 UTC 2008
The following commit has been merged in the debian/unstable branch:
commit fb17f7c906a2d8549901613101b24b9c33e4c8b6
Author: Michael Tautschnig <mt at debian.org>
Date: Sun Nov 23 06:52:30 2008 -0800
Make clamav-daemon restart clamav-milter on update
- Touch /var/run/clamav-daemon-being-upgraded in clamav-daemon.prerm on
"upgrade"
- Touch /var/run/clamav-daemon-being-upgraded.milter-restart if the former file
exists while running clamav-milter.init/start and do nothing
- rm -f it in clamav-daemon.postinst and restart clamav-milter if the
milter-restart file exists, rm milter-restart file afterwards
Signed-off-by: Michael Tautschnig <mt at debian.org>
diff --git a/debian/changelog b/debian/changelog
index 6ba3886..08e88bb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,8 @@ clamav (0.94.dfsg.1-2) unstable; urgency=low
* Removed --unzip from clampipe script (closes: #506055)
* Moved clamav-milter specific stuff from its specific README.Debian to
clamav-global one.
+ * Sync start of clamav-milter with clamav-daemon when clamav-daemon is being
+ upgraded (closes: #309067)
-- Michael Meskes <meskes at debian.org> Sat, 22 Nov 2008 17:47:27 -0800
diff --git a/debian/clamav-daemon.postinst.in b/debian/clamav-daemon.postinst.in
index 070180d..26c98f9 100644
--- a/debian/clamav-daemon.postinst.in
+++ b/debian/clamav-daemon.postinst.in
@@ -89,4 +89,14 @@ esac
#DEBHELPER#
+rm -f /var/run/clamav-daemon-being-upgraded
+if [ -e "/var/run/clamav-daemon-being-upgraded.milter-restart" ] ; then
+ if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
+ invoke-rc.d clamav-milter start
+ else
+ /etc/init.d/clamav-milter start
+ fi
+ rm /var/run/clamav-daemon-being-upgraded.milter-restart
+fi
+
exit 0
diff --git a/debian/clamav-daemon.prerm b/debian/clamav-daemon.prerm
new file mode 100644
index 0000000..cd9a6d2
--- /dev/null
+++ b/debian/clamav-daemon.prerm
@@ -0,0 +1,19 @@
+#! /bin/sh
+set -e
+
+case "$1" in
+ upgrade)
+# information for clamav-milter that clamd is in the process of being upgraded,
+# which may cause problems when using --external in clamav-milter (see #309067);
+# clamav-milter will check for this and request a restart by clamav-daemon
+ touch /var/run/clamav-daemon-being-upgraded
+ ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
diff --git a/debian/clamav-milter.init.in b/debian/clamav-milter.init.in
index cbfbcd2..f5d0f1a 100644
--- a/debian/clamav-milter.init.in
+++ b/debian/clamav-milter.init.in
@@ -23,6 +23,7 @@ OPTIONS="-dq"
SUPERVISOR=/usr/bin/daemon
SUPERVISORPIDFILE="/var/run/clamav/daemon-clamav-milter.pid"
SUPERVISORARGS="-F $SUPERVISORPIDFILE --name=$BASENAME --respawn"
+CLAMAVDAEMONUPGRADE="/var/run/clamav-daemon-being-upgraded"
[ -x "$DAEMON" ] || exit 0
[ -r "$CLAMAVCONF" ] || exit 0
@@ -86,6 +87,11 @@ case "$1" in
exit 1
fi
fi
+ if [ -e "$CLAMAVDAEMONUPGRADE" ] ; then
+ touch $CLAMAVDAEMONUPGRADE.milter-restart
+ log_warning_msg "clamd may be required to run $DAEMON, clamav-milter will be restarted by clamav-daemon"
+ exit 0
+ fi
if [ -z "$RUN_SUPERVISED" ] ; then
log_daemon_msg "Starting $DESC" "$BASENAME"
su "$User" -p -s /bin/sh -c ". /lib/lsb/init-functions && start_daemon $DAEMON $OPTIONS --pidfile $PIDFILE $SOCKET" > /dev/null
--
Debian repository for ClamAV
More information about the Pkg-clamav-commits
mailing list