summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEray Aslan <eras@gentoo.org>2011-06-10 11:49:10 +0000
committerEray Aslan <eras@gentoo.org>2011-06-10 11:49:10 +0000
commitf7e49cc4be785a112a11d2a12e82fd8e32feb31e (patch)
tree59d9a45b5d7d27bd2cd8ea0433bd8e7d301e2ab2 /mail-filter/dk-milter
parent[bump] virtual/perl-Time-HiRes-1.972.400 (diff)
downloadgentoo-2-f7e49cc4be785a112a11d2a12e82fd8e32feb31e.tar.gz
gentoo-2-f7e49cc4be785a112a11d2a12e82fd8e32feb31e.tar.bz2
gentoo-2-f7e49cc4be785a112a11d2a12e82fd8e32feb31e.zip
Remove stale socket on start up - bug #355443. Thanks to Alexey Lapitsky
(Portage version: 2.1.10/cvs/Linux x86_64)
Diffstat (limited to 'mail-filter/dk-milter')
-rw-r--r--mail-filter/dk-milter/ChangeLog7
-rwxr-xr-xmail-filter/dk-milter/files/dk-filter.init15
2 files changed, 16 insertions, 6 deletions
diff --git a/mail-filter/dk-milter/ChangeLog b/mail-filter/dk-milter/ChangeLog
index b4eb0e0254c5..8f97f0a2fe78 100644
--- a/mail-filter/dk-milter/ChangeLog
+++ b/mail-filter/dk-milter/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for mail-filter/dk-milter
-# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/mail-filter/dk-milter/ChangeLog,v 1.19 2009/08/22 22:47:13 mrness Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/dk-milter/ChangeLog,v 1.20 2011/06/10 11:49:10 eras Exp $
+
+ 10 Jun 2011; Eray Aslan <eras@gentoo.org> files/dk-filter.init:
+ Remove stale socket on start up - bug #355443. Thanks to Alexey Lapitsky
*dk-milter-1.0.2-r1 (22 Aug 2009)
diff --git a/mail-filter/dk-milter/files/dk-filter.init b/mail-filter/dk-milter/files/dk-filter.init
index 77dabec2b70c..148a22ad8221 100755
--- a/mail-filter/dk-milter/files/dk-filter.init
+++ b/mail-filter/dk-milter/files/dk-filter.init
@@ -1,7 +1,7 @@
#!/sbin/runscript
-# Copyright 1999-2007 Gentoo Foundation
+# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/mail-filter/dk-milter/files/dk-filter.init,v 1.4 2007/10/12 20:31:23 mrness Exp $
+# $Header: /var/cvsroot/gentoo-x86/mail-filter/dk-milter/files/dk-filter.init,v 1.5 2011/06/10 11:49:10 eras Exp $
depend() {
use dns logger net
@@ -24,8 +24,15 @@ check_cfg() {
fi
if [[ " ${ADDITIONAL_OPTS} " == *" -"[fpP]" "* ]]; then
- eerror "-f, -p or -P are not allowed in ADDITIONAL_OPTS"
- return 1
+ eerror "-f, -p or -P are not allowed in ADDITIONAL_OPTS"
+ return 1
+ fi
+
+ if [[ "${SOCKET_TYPE}" == "local" && -S "${SOCKET_ADDRESS}" ]] ; then
+ ewarn "Strange, the socket file already exist in \"${SOCKET_ADDRESS}\""
+ ewarn "it will be removed now and re-created by the service"
+ ewarn "BUT please make your checks."
+ rm -f "${SOCKET_ADDRESS}"
fi
}