rc.d/named default pidfile

Devin Teske devin.teske at fisglobal.com
Fri Dec 23 17:17:18 UTC 2011


Working on named(8) with a co-worker yesterday, we were surprised to see what appears to be a typo in the rc.d script in FreeBSD-8.1.

Please find attached a patch for HEAD (not FreeBSD-8.1; the typo still exists in HEAD).

_____________
The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: named.patch
Type: application/octet-stream
Size: 314 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-rc/attachments/20111223/27f7ac5d/named.obj
-------------- next part --------------


Details/History:

In FreeBSD-8.1, the rc.d script declares named(8) isn't running when it-is because the default pidfile is incorrectly "/var/run/named/pid" when the program itself writes "/var/run/named.pid" (notice the trailing ".pid" versus "/pid").

In SVN rev 220962 the rc.d script was changed by dougb to dynamically determine the pidfile location from the configuration file. When this patch was applied, the rc.d script started working again w/respect to "status" (accurately reported when named(8) was/wasn't running). Unfortunately, the typo still exists (see patch for HEAD).

I would like to request that this patch be made against HEAD, and the changes be MFC'd to stable/8, ultimately to be ready for the release/8.3 branch when copied (we're planning on skipping 8.2 and jumping to 8.3 as our next release; currently being on 8.1).

Aside:

On FreeBSD-8.1, if someone wants to make the appropriate fix, the change must be made in two places. src/etc/rc.d/named and src/etc/defaults/rc.conf

Work-around in FreeBSD-8.1 and older (not sure about 8.2, but RELENG_8 appears to have received SVN rev 220962 so named_pidfile no longer has any effect):

Add named_pidfile="/var/run/named.pid" to your rc.conf(5)
-- 
Devin


More information about the freebsd-rc mailing list