Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Dec 2011 09:17:14 -0800
From:      Devin Teske <devin.teske@fisglobal.com>
To:        FreeBSD RC <freebsd-rc@freebsd.org>
Cc:        Dave Robison <Dave.Robison@fisglobal.com>
Subject:   rc.d/named default pidfile
Message-ID:  <D4870D02-5E62-4A02-ACBB-47D3DBF3594D@fisglobal.com>

next in thread | raw e-mail | index | archive | help
--Apple-Mail-38-608566932
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="us-ascii"

Working on named(8) with a co-worker yesterday, we were surprised to see wh=
at 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 exis=
ts in HEAD).

_____________
The information contained in this message is proprietary and/or confidentia=
l. If you are not the intended recipient, please: (i) delete the message an=
d all copies; (ii) do not disclose, distribute or use the message in any ma=
nner; and (iii) notify the sender immediately. In addition, please be aware=
 that any message addressed to our domain is subject to archiving and revie=
w by persons other than the intended recipient. Thank you.

--Apple-Mail-38-608566932
Content-Disposition: attachment; filename="named.patch"
Content-Type: application/octet-stream; name="named.patch"
Content-Transfer-Encoding: 7bit

--- HEAD/src/etc/rc.d/named.orig	Sun May 15 20:25:41 2011
+++ HEAD/src/etc/rc.d/named	Fri Dec 23 08:50:17 2011
@@ -117,7 +117,7 @@ find_pidfile()
 	if get_pidfile_from_conf pid-file $named_conf; then
 		pidfile="$_pidfile_from_conf"
 	else
-		pidfile="/var/run/named/pid"
+		pidfile="/var/run/named.pid"
 	fi
 }
 

--Apple-Mail-38-608566932
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset="us-ascii"



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=3D"/var/run/named.pid" to your rc.conf(5)
--=20
Devin=

--Apple-Mail-38-608566932--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D4870D02-5E62-4A02-ACBB-47D3DBF3594D>