'service named reload' with non-default system directories.

Sean Bruno sean_bruno at yahoo.com
Wed Apr 24 16:27:26 UTC 2013


On Wed, 2013-04-24 at 16:35 +0200, Ian FREISLICH wrote:

> 
> --- /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 @@
>  
>  named_reload()
>  {
> -       ${command%/named}/rndc reload
> +       ${command%/named}/rndc -k ${named_confdir}/rndc.key reload
>  }
>  
>  find_pidfile()
<snip>
> 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:
> 
> ---named.conf---
> include "/etc/namedb/rndc.key";
> 
> controls {
>         inet 127.0.0.1 allow { 127.0.0.1; } keys { "rndc-key"; };
> };
> ---named.conf---
> 
> ---rndc.conf---
> include "/etc/namedb/rndc.key";
> 
> options {
>         default-server  localhost;
>         default-key     rndc-key;
> };
> 
> server localhost {
>         key     rndc-key;
> };
> ---rndc.conf---
> 
> And the following version of the above patch:
> 
> --- /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 @@
>  
>  named_reload()
>  {
> -       ${command%/named}/rndc reload
> +       ${command%/named}/rndc -c ${named_confdir}/rndc.conf reload
>  }
>  
>  find_pidfile()
> 
> this will allow the rc system to reload and stop named (without a
> kill) no matter what the configured chroot is.
> 
> Ian
> 


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20130424/af26c127/attachment.sig>


More information about the freebsd-current mailing list