Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 19 Dec 2005 02:45:51 +0100 (CET)
From:      Petr Rehor <prehor@gmail.com>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        perl@FreeBSD.org
Subject:   ports/90625: [patch] mail/p5-Mail-SpamAssassin - properly set pidfile in rc.d script
Message-ID:  <200512190145.jBJ1jpPd026180@charon.rx.cz>
Resent-Message-ID: <200512190150.jBJ1o3AQ076984@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         90625
>Category:       ports
>Synopsis:       [patch] mail/p5-Mail-SpamAssassin - properly set pidfile in rc.d script
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Mon Dec 19 01:50:02 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Petr Rehor
>Release:        FreeBSD 6.0-RELEASE i386
>Organization:
>Environment:
System: FreeBSD charon.rx.cz 6.0-RELEASE FreeBSD 6.0-RELEASE #0: Tue Nov 8 20:44:39 UTC 2005 root@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 ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200512190145.jBJ1jpPd026180>