Date: Sat, 20 Oct 2007 02:45:04 +0800 (CST) From: Xin LI <delphij@FreeBSD.org> To: FreeBSD-gnats-submit@FreeBSD.org Cc: dinoex@FreeBSD.org Subject: ports/117340: [PATCH] Improve mail/sid-milter startup process Message-ID: <20071019184504.F2DFA28449@tarsier.delphij.net> Resent-Message-ID: <200710191850.l9JIo170063538@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 117340 >Category: ports >Synopsis: [PATCH] Improve mail/sid-milter startup process >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Oct 19 18:50:01 UTC 2007 >Closed-Date: >Last-Modified: >Originator: Xin LI >Release: FreeBSD 7.0-PRERELEASE i386 >Organization: The FreeBSD Project >Environment: System: FreeBSD tarsier.delphij.net 7.0-PRERELEASE FreeBSD 7.0-PRERELEASE #2: Fri Oct 19 08:41:55 CST 2007 delphij@tarsier.delphij.net:/usr/obj/usr/src/sys/TARSIER i386 >Description: sid-milter's rc.d script have a function of removing stale sockets after stop; unfortunately, when system was crashed this would not work so sid-milter won't start properly. Therefore, I think it might be better to have the removal process inside the pre-start command stage. That is, we don't rely on shutdown process to do the cleanup, but do the cleanup before sid-milter is started. Maintainer (dinoex@) cc'ed. >How-To-Repeat: Crash a system without proper shutdown and restart. >Fix: --- patch-sid-milter begins here --- Index: Makefile =================================================================== RCS file: /home/ncvs/ports/mail/sid-milter/Makefile,v retrieving revision 1.18 diff -p -u -r1.18 Makefile --- Makefile 17 Mar 2007 08:47:42 -0000 1.18 +++ Makefile 19 Oct 2007 18:40:25 -0000 @@ -7,7 +7,7 @@ PORTNAME= sid-milter PORTVERSION= 0.2.14 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= mail MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= sid-milter Index: files/milter-sid.sh.in =================================================================== RCS file: /home/ncvs/ports/mail/sid-milter/files/milter-sid.sh.in,v retrieving revision 1.3 diff -p -u -r1.3 milter-sid.sh.in --- files/milter-sid.sh.in 11 Jul 2006 05:17:07 -0000 1.3 +++ files/milter-sid.sh.in 19 Oct 2007 18:39:38 -0000 @@ -6,7 +6,6 @@ # PROVIDE: miltersid # REQUIRE: DAEMON # BEFORE: mail localpkg -# KEYWORD: shutdown # Define these miltersid_* variables in one of these files: # /etc/rc.conf @@ -30,9 +29,9 @@ load_rc_config $name pidfile=${miltersid_pid} command="%%PREFIX%%/libexec/sid-filter" command_args="-l -p ${miltersid_socket} -P ${miltersid_pid}" -stop_postcmd="sid_postcmd" +start_precmd="sid_precmd" -sid_postcmd () +sid_precmd () { if [ -S ${miltersid_socket##local:} ] ; then rm -f ${miltersid_socket##local:} --- patch-sid-milter ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20071019184504.F2DFA28449>