From nobody@FreeBSD.org  Thu Mar 15 00:13:02 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 668FF106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 15 Mar 2012 00:13:02 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 568D78FC18
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 15 Mar 2012 00:13:02 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q2F0D1Bd082228
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 15 Mar 2012 00:13:01 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q2F0D1lb082220;
	Thu, 15 Mar 2012 00:13:01 GMT
	(envelope-from nobody)
Message-Id: <201203150013.q2F0D1lb082220@red.freebsd.org>
Date: Thu, 15 Mar 2012 00:13:01 GMT
From: Genjiro Yaijma <gab@n.email.ne.jp>
To: freebsd-gnats-submit@FreeBSD.org
Subject: About the PID file of bsnmpd 
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         166126
>Category:       conf
>Synopsis:       [patch] allow the PID file of rc.d/bsnmpd to be overridden
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    dougb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 15 00:20:01 UTC 2012
>Closed-Date:    Sun Mar 18 01:39:30 UTC 2012
>Last-Modified:  Sun Mar 18 01:40:13 UTC 2012
>Originator:     Genjiro Yaijma
>Release:        9.0-STABLE(2012/3/1)
>Organization:
self
>Environment:
FreeBSD andy.peanuts.levelzero.jp 9.0-STABLE FreeBSD 9.0-STABLE #1: Thu Mar  1 22:48:03 JST 2012     admin@andy.peanuts.levelzero.jp:/usr/obj/usr/src/sys/GaBby  amd64
>Description:
The file name of a PID file cannot be changed but the PID file name of Net-SNMP is collided with. 
In my case, mainly bsnmpd changed port, and Net-SNMP was both started, and it has taken the required place of bsnmpd using the proxy function of Net-SNMP. 
For such a reason, the PID file name of Net-SNMP was specified as snmpd_pidfile, and was changed. 
It was worrisome suddenly that a setup of bsmpd_pidfile of bsnmpd does not exist, and it checked and corrected /etc/rc.d/bsnmpd. 

>How-To-Repeat:
In my version, it was as follows. 

15  pidfile=${bsnmpd_pidfile:-/var/run/${name}.pid} 

The argument which passes a PID file to the bottom of it was added. 

16  command_args="-p ${pidfile}" 
>Fix:
--- /usr/src/etc/rc.d/bsnmpd    2012-02-14 19:16:56.000000000 +0900
+++ /etc/rc.d/bsnmpd    2012-03-13 17:50:09.000000000 +0900
@@ -12,7 +12,8 @@
 name="bsnmpd"
 rcvar="bsnmpd_enable"
 command="/usr/sbin/${name}"
-pidfile="/var/run/snmpd.pid"
+pidfile=${bsnmpd_pidfile:-/var/run/${name}.pid}
+command_args="-p ${pidfile}"

 load_rc_config $name
 run_rc_command "$1"


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-amd64->freebsd-rc 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Mar 17 04:36:08 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=166126 
State-Changed-From-To: open->analyzed 
State-Changed-By: dougb 
State-Changed-When: Sat Mar 17 04:41:22 UTC 2012 
State-Changed-Why:  

I'm sorry, it's not clear to me what problem you're trying to solve. 
Are there situations where multiple services can be started that are 
all trying to use the same pidfile?  

If that's the case, and one service is from ports, and the other is from 
the base, then it's the ports rc.d script that should change. 

If you can provide more information I'll look into this more closely. 


Doug 

http://www.freebsd.org/cgi/query-pr.cgi?pr=166126 
State-Changed-From-To: analyzed->closed 
State-Changed-By: dougb 
State-Changed-When: Sun Mar 18 01:38:07 UTC 2012 
State-Changed-Why:  

This issue was resolved by updating the default pidfile in the 
net-snmpd port. Please re-install the port (even if you're at the latest 
version) and you should be fine. 


Responsible-Changed-From-To: freebsd-rc->dougb 
Responsible-Changed-By: dougb 
Responsible-Changed-When: Sun Mar 18 01:38:07 UTC 2012 
Responsible-Changed-Why:  

I worked with zi to resolve this issue. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=166126 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: conf/166126: commit references a PR
Date: Sun, 18 Mar 2012 01:37:48 +0000 (UTC)

 zi          2012-03-18 01:37:35 UTC
 
   FreeBSD ports repository
 
   Modified files:
     net-mgmt/net-snmp/files snmpd.sh.in 
   Log:
   - Fix various issues with rc script, including:
   -- Change default pidfile name to avoid conflict with bsnmpd
   -- Remove check for deprecated net_snmpd_enable
   - Do not bump PORTREVISION at this time
   
   PR:             conf/166126
   Submitted by:   dougb@
   Feature safe:   yes
   
   Revision  Changes    Path
   1.11      +41 -56    ports/net-mgmt/net-snmp/files/snmpd.sh.in
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
>Unformatted:
