[Dnsmasq-discuss] extension of configuration files

Paul Chambers dnsmasq at lists.bod.org
Sun Jul 5 17:18:49 BST 2009


Simon Kelley wrote:
> Rance Hall wrote:
>   
>> On Sun, Jul 5, 2009 at 7:56 AM, Helmut Hullen<Hullen at t-online.de> wrote:
>>     
>>> Hallo, RevRagnarok,
>>>
>>> Du meintest am 05.07.09 zum Thema Re: [Dnsmasq-discuss] extension of configuration files:
>>>
>>>       
>>>>> Could dnsmasq exclude *.new files from reading? Some other programs
>>>>> do so.
>>>>>           
>>>> By extension, it should probably just ignore everything not *.conf,
>>>> since other package managers use other methods, e.g. .rpmnew and
>>>> .rpmold.
>>>>         
>>> Sounds reasonable.
>>> Please keep the traffic in the mailing list!
>>>
>>> Viele Gruesse!
>>> Helmut
>>>
>>> _______________________________________________
>>> Dnsmasq-discuss mailing list
>>> Dnsmasq-discuss at lists.thekelleys.org.uk
>>> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>>>
>>>       
>> I think this is a great idea but I don't think it belongs in dnsmasq
>> proper.  I think it makes the code base bigger for no real feature
>> gain.  This is something that could be handled  in an init script
>> stanza prior to actually launching dnsmasq.
>>
>> set a variable for the main config file
>> parse it looking for config_dir
>> if found, check contents for updated scripts (test will be different
>> for each distro I suspect)
>> mv the updated files to config_dir.update
>>
>> start dnsmasq the normal way
>>
>> If you did this in the init script then it would be much more flexible
>> for per distro variations.
>>
>> Personally, I've never seen a distro actually populate the config_dir
>> usually its commented out of the  main config file
>>
>> Its ultimately up to Simon, but I've seen other comments from him that
>> indicate code size is important for him as he knows that dnsmasq is
>> used in embedded devices.  I don't see embedded devices benefiting
>> from this change.
>>     
> I'd be in a stronger position to refuse to do this if the code didn't
> already weed out filenames which look like .file and file~ and #file#.
> I'm an emacs user and those last two are emacs droppings. 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.
>   
I'm not in favor of having dnsmasq ignore config files - sounds like a 
trap for the unwary to me. I'd much rather see it done in an init script 
like Rance suggested - at least then it could be distro-specific (Fedora 
uses .rpmnew and .rpmsave, so seems like there's no consistency at all :).

Having said that, if some logic were added that identified filenames 
that only differed by the addition of an extension, and then only 
ingested the one with the shortest name, perhaps that would behave well 
in the majority of cases?  I don't really see the current implementation 
as 'broken', but if it's going to be 'fixed'...

-- Paul





More information about the Dnsmasq-discuss mailing list