[Dnsmasq-discuss] extension of configuration files

Simon Kelley simon at thekelleys.org.uk
Mon Jul 6 14:42:28 BST 2009


Helmut Hullen wrote:
> Hallo, Carlos,
> 
> Du meintest am 05.07.09:
> 
>>> I guess the problem is knowing _which_ files should be ignored ( how
>>> many conventions are there?) and not ignoring files which someone,
>>> somewhere, thinks are perfectly OK and should be used.
> 
>> That's clearly impossible. If you decide to do it there are only two
>> possibilities: define the (only) extension in dnsmasq, or do it like
>> apache, as Michael says. I think the later is too much bloat. I'd
>> rather not have any exclusion but since you ruled this out we're left
>> with the first alternative.
> 
> If dnsmasq had defined "allowed extensions" from the beginning there  
> would be no problem, but it hasn't. And therefore every user may have  
> declared his own extensions (or no one). Therefor dnsmasq cannot change  
> its behaviour - I had forgotten this small problem ...
> 
>> What about just leaving it as it's now? :-)
> 
> Under my slackware installation I'll write my special slackware  
> extension watcher ... it first has to look what's the name of "conf- 
> dir". Ugly.
> 

There's an alternative which is backwards compatible: extend the
--conf-dir option optionally allow extensions which should _NOT_ be
used, so the correct form to solve the initial problem would be

--conf-dir=/etc/dnsmasq.d,.new

I guess that for completeness, more than one extension should be
allowed. That would meant that (for instance) the Debian dnsmasq
package, which automatically reads /etc/dnsmasq.d for config fragments
dropped by other packages, could ignore *.dpkg-dist *.dpkg-old and
*.dpkg-new. That's a useful improvement.

Cheers,

Simon.




More information about the Dnsmasq-discuss mailing list