Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Mar 2012 00:13:01 GMT
From:      Genjiro Yaijma <gab@n.email.ne.jp>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   amd64/166126: About the PID file of bsnmpd 
Message-ID:  <201203150013.q2F0D1lb082220@red.freebsd.org>
Resent-Message-ID: <201203150020.q2F0K1Cf011919@freefall.freebsd.org>

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

>Number:         166126
>Category:       amd64
>Synopsis:       About the PID file of bsnmpd
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-amd64
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 15 00:20:01 UTC 2012
>Closed-Date:
>Last-Modified:
>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:
>Unformatted:



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