[patch] mail/p5-Mail-SpamAssassin - properly set pidfile in rc.d script

Petr Rehor prehor at gmail.com
Sun Dec 18 17:46:13 PST 2005


>Submitter-Id:	current-users
>Originator:	Petr Rehor
>Organization:	
>Confidential:	no 
>Synopsis:	[patch] mail/p5-Mail-SpamAssassin - properly set pidfile in rc.d script
>Severity:	non-critical
>Priority:	low
>Category:	ports
>Class:		update
>Release:	FreeBSD 6.0-RELEASE i386
>Environment:
System: FreeBSD charon.rx.cz 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Tue Nov 8 20:44:39 UTC 2005 root at marvin.rx.cz:/usr/obj/usr/src/sys/GENERIC i386
>Description:
- PID file name in rc.d scripts must be set to "pidfile" variable,
  not to "<name>_pidfile" variable.
- Placing -r (and -d too) options to command_args is more suitable because
  they mustn't be overwrited by spamd_flags
>How-To-Repeat:
	
>Fix:
--- p5-Mail-SpamAssassin.diff begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/mail/p5-Mail-SpamAssassin/Makefile,v
retrieving revision 1.84
diff -u -r1.84 Makefile
--- Makefile	16 Dec 2005 05:05:47 -0000	1.84
+++ Makefile	19 Dec 2005 01:26:46 -0000
@@ -7,7 +7,7 @@
 
 PORTNAME=	Mail-SpamAssassin
 PORTVERSION=	3.1.0
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	mail perl5
 MASTER_SITES=	${MASTER_SITE_APACHE:S/$/:apache/} ${MASTER_SITE_PERL_CPAN:S/$/:cpan/}
 MASTER_SITE_SUBDIR=	spamassassin/source/:apache Mail/:cpan
Index: files/spamd.sh
===================================================================
RCS file: /home/ncvs/ports/mail/p5-Mail-SpamAssassin/files/spamd.sh,v
retrieving revision 1.11
diff -u -r1.11 spamd.sh
--- files/spamd.sh	10 May 2005 13:00:22 -0000	1.11
+++ files/spamd.sh	19 Dec 2005 00:45:11 -0000
@@ -21,7 +21,15 @@
 name=spamd
 rcvar=`set_rcvar`
 
+load_rc_config $name
+
+# Set defaults
+: ${spamd_enable:="NO"}
+: ${spamd_flags="-c %%SQL_FLAG%% %%RUN_AS_USER%%"}
+
+pidfile=${spamd_pidfile:-"/var/run/spamd/spamd.pid"}
 command=%%PREFIX%%/bin/spamd
+command_args="-d -r ${pidfile}"
 required_dirs=%%PREFIX%%/share/spamassassin
 
 stop_postcmd=stop_postcmd
@@ -31,11 +39,4 @@
   rm -f $pidfile
 }
 
-# set defaults
-
-spamd_enable=${spamd_enable:-"NO"}
-spamd_pidfile=${spamd_pidfile:-"/var/run/spamd/spamd.pid"}
-spamd_flags=${spamd_flags:-"-c -d %%SQL_FLAG%% -r ${spamd_pidfile} %%RUN_AS_USER%%"}
-
-load_rc_config $name
 run_rc_command "$1"
--- p5-Mail-SpamAssassin.diff ends here ---




More information about the freebsd-perl mailing list