ports/97283: mail/fetchmail: system start script nits

Martin Jackson mhjacks at swbell.net
Mon May 15 01:20:22 UTC 2006


>Number:         97283
>Category:       ports
>Synopsis:       mail/fetchmail: system start script nits
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 15 01:20:21 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator:     Martin Jackson
>Release:        FreeBSD 6.1-RELEASE i386
>Organization:
private
>Environment:
System: FreeBSD anduril.minas.tirith 6.1-RELEASE FreeBSD 6.1-RELEASE #5: Sun May 14 16:27:56 CDT 2006 root at anduril.minas.tirith:/usr/obj/usr/src/sys/SERVER i386

>Description:
	Systemwide start script has two small issues:
	1)  pidfile is defined as /var/run/fetchmail/${name}.pid.  This code path followed for awaken looks for /var/run/${name}.pid, and $pidfile is reported to be in the wrong place.
	2)  /var/run/fetchmail is not created.
>How-To-Repeat:
	enable fetchmail system-wide mode and start it.
	run $PREFIX/rc.d/fetchmail awaken
>Fix:
	The attached patch addresses both issues, though there may be a better
	way to address the second one than the one offered (if fetchmail user is 	always going to be used, the right place to do this might be at pkg 
	install:

--- fetchmail.in.orig	Sun May 14 20:05:45 2006
+++ fetchmail.in	Sun May 14 20:06:39 2006
@@ -52,7 +52,7 @@
 rcvar=`set_rcvar`
 
 command=%%PREFIX%%/bin/${name}
-pidfile=/var/run/${name}.pid
+pidfile=/var/run/${name}/${name}.pid
 extra_commands="awaken"
 awaken_cmd="fetchmail_awaken"
 
@@ -89,6 +89,8 @@
 		else
 			eval fetchmail_user=fetchmail
 			eval pidfile=/var/run/fetchmail/fetchmail.pid
+			mkdir -p /var/run/fetchmail
+			chown $fetchmail_user /var/run/fetchmail
 		fi
 		required_files=${fetchmail_config}
 		eval fetchmail_polling_interval="\${fetchmail_${user}_polling_interval:-${fetchmail_polling_interval}}"
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list