From owner-freebsd-current@FreeBSD.ORG Wed Apr 24 16:27:26 2013 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 01038F16 for ; Wed, 24 Apr 2013 16:27:25 +0000 (UTC) (envelope-from sean_bruno@yahoo.com) Received: from nm8-vm0.bullet.mail.ne1.yahoo.com (nm8-vm0.bullet.mail.ne1.yahoo.com [98.138.91.23]) by mx1.freebsd.org (Postfix) with ESMTP id BC0951EE7 for ; Wed, 24 Apr 2013 16:27:25 +0000 (UTC) Received: from [98.138.226.177] by nm8.bullet.mail.ne1.yahoo.com with NNFMP; 24 Apr 2013 16:27:19 -0000 Received: from [98.138.226.130] by tm12.bullet.mail.ne1.yahoo.com with NNFMP; 24 Apr 2013 16:27:19 -0000 Received: from [127.0.0.1] by smtp217.mail.ne1.yahoo.com with NNFMP; 24 Apr 2013 16:27:19 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1366820839; bh=1HrBP9B6ZuBfhg7b3aynQQf1XxqMwx0gNlADepNnICs=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Subject:From:Reply-To:To:Cc:In-Reply-To:References:Content-Type:Date:Message-ID:Mime-Version:X-Mailer; b=3VIyHCCBcCWBpYrBKrLQIyoiRA0ZYFirv6iOxov+pbKff6rrWQrm/i8F+SjdeqowrFUTzH17E2xmPOs2yHknmctLxdXDgxgTKbfdfBDmYpWpgRfNxkMaqeAVjpV/YV6kO2V81L1+jhtyl/W4lOVSHYDRU9cXnYHAKPkPgcDIhSc= X-Yahoo-Newman-Id: 432203.2001.bm@smtp217.mail.ne1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: MSjBvEwVM1m4myIZ5QZPDicdmAk0eIFgKXPMv427LAOtkLM KeCmjgElM.U3JoIHlnU3bJO0SFJqsOOGQvhJ.KonQvjX8OwsZkm3PuAOdM9a inVvTiAXqv_TOv8NXMgmL.EpOQPAAn73dsPL2f3tnmiY42kyT3IYLHWXzcRI ko0X48_nC4HTSE2Fu83HrHB27YcR7MXOSUoZn3JBjI1yaZbRfcOVda8pmNfd zue43PnY0Jufk98XQ141vUA5JnH9TLpyBImgNOlD0p.3rQsOuCRjVjmBDvZv 4SZMWpRU_5dMCZ4jrgJE9sd5VO6Qy9Q4vKln2WQS1YMtf2nZVoAu6jsi0WGM lX5M90C2im6j2.0sJbY_onMxIO1Vwfplejl51wMxGSJJkbnyfga_WYFG3Pqx jucRnj.YJ1knVH5iBohh7UXRMitNes_6.cKx81KyY.R3jYNMowhnOUJ0j8c_ Nl3oaldRNASRRYhqbSbYPfKKxPqztguftTA-- X-Yahoo-SMTP: u5BKR6OswBC_iZJVfGRoMkTIpc8pEA4- X-Rocket-Received: from [10.73.160.242] (sean_bruno@209.131.62.116 with plain) by smtp217.mail.ne1.yahoo.com with SMTP; 24 Apr 2013 16:27:19 +0000 UTC Subject: Re: 'service named reload' with non-default system directories. From: Sean Bruno To: Ian FREISLICH In-Reply-To: References: Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-wNGJmCJj96NcA6Rbdy4b" Date: Wed, 24 Apr 2013 09:27:18 -0700 Message-ID: <1366820838.1405.3.camel@localhost> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Cc: current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: sbruno@freebsd.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Apr 2013 16:27:26 -0000 --=-wNGJmCJj96NcA6Rbdy4b Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable On Wed, 2013-04-24 at 16:35 +0200, Ian FREISLICH wrote: >=20 > --- /usr/src/etc/rc.d/named 2013-04-15 20:17:58.000000000 +0200 > +++ /etc/rc.d/named 2013-04-24 16:16:52.000000000 +0200 > @@ -109,7 +109,7 @@ > =20 > named_reload() > { > - ${command%/named}/rndc reload > + ${command%/named}/rndc -k ${named_confdir}/rndc.key reload > } > =20 > find_pidfile() > So, I 'include "path/to/rndc.key";' in named.conf, add a controls > section that uses this named key and I use the following rndc.conf: >=20 > ---named.conf--- > include "/etc/namedb/rndc.key"; >=20 > controls { > inet 127.0.0.1 allow { 127.0.0.1; } keys { "rndc-key"; }; > }; > ---named.conf--- >=20 > ---rndc.conf--- > include "/etc/namedb/rndc.key"; >=20 > options { > default-server localhost; > default-key rndc-key; > }; >=20 > server localhost { > key rndc-key; > }; > ---rndc.conf--- >=20 > And the following version of the above patch: >=20 > --- /usr/src/etc/rc.d/named 2013-04-15 20:17:58.000000000 +0200 > +++ /etc/rc.d/named 2013-04-24 16:16:52.000000000 +0200 > @@ -109,7 +109,7 @@ > =20 > named_reload() > { > - ${command%/named}/rndc reload > + ${command%/named}/rndc -c ${named_confdir}/rndc.conf reload > } > =20 > find_pidfile() >=20 > this will allow the rc system to reload and stop named (without a > kill) no matter what the configured chroot is. >=20 > Ian >=20 Would we need a change to /etc/defaults/rc.conf to set ${named_confdir} to the default location if not set? Also, there already appears to be a ${named_conf} that points to whatever named.conf specified (defaults to /etc/namedb/named.conf). Is this complementary to what you're poking at? Sean --=-wNGJmCJj96NcA6Rbdy4b Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.13 (FreeBSD) iQEcBAABAgAGBQJReAfeAAoJEBkJRdwI6BaHSAoH/0gj6jo27TgT6JQzDXprrZbT JMSbN5MDBNW7kaYz0KAz4XqnWw39MML5ZEp2xi12/BaOWlWfj981IoRCGudUFaYX ydY2ioVX4NQ4u80mnz4ZweNjQUf4XoGJTYUcrvw53QP8/lR8bxC4Wv7CkA6vJszT 9WyD8Y9XSWt8o8vwL0sjPobOWziJe7OCk7o1yAWHp7a5Dz/5MAYXGiq2nQgurNFg 01+8/Q61RKQP64cXO65rouHObVQ22rIG75mHGl9OXRYidKOZvshofsIQJY1w5pLz f4yrQXA/xvc5DvmGWw9WmMOENG6ztHTbGpEfWNtrLjMnWuz1ydPLoWswBSLmVnw= =ucAK -----END PGP SIGNATURE----- --=-wNGJmCJj96NcA6Rbdy4b--