Re: [Dnsmasq-discuss] --addn-hosts and --hostsdir

2019-10-07 Thread Simon Kelley
On 02/10/2019 07:25, Geert Stappers wrote:
> On Wed, Oct 02, 2019 at 11:16:18AM +0800, Hongyi Zhao wrote:
>> Hi,
>>
>> The manpage said that:
>>
>> ---
>>   -H, --addn-hosts=
>>   Additional hosts file.  Read  the  specified  file  as  well  
>> as
>>   /etc/hosts.  If  --no-hosts  is  given,  read only the 
>> specified
>>   file. This option may be repeated for more than  one  
>> additional
>>   hosts  file.  If  a  directory is given, then read all the 
>> files
>>   contained in that directory.
>>
>>--hostsdir=
>>   Read all the hosts files contained  in  the  directory.  New  
>> or
>>   changed  files  are  read automatically. See --dhcp-hostsdir 
>> for
>>   details.
>> ---
>>
>> According to the above description, the --addn-hosts can do all the
>> things done by  --hostsdir,
> 
> No.
> 
> The difference is
>New or changed files are read automatically.
> 
> 
> 

What he said. And the reason they both exist is that --addn-hosts
existed first, and when the ability to automatically read files was
added, there was a desire not to introduce bugs in existing
configurations by subtly changing the behaviour of the existing option.


Simon.



___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


Re: [Dnsmasq-discuss] --addn-hosts and --hostsdir

2019-10-02 Thread Geert Stappers
On Wed, Oct 02, 2019 at 11:16:18AM +0800, Hongyi Zhao wrote:
> Hi,
> 
> The manpage said that:
> 
> ---
>   -H, --addn-hosts=
>   Additional hosts file.  Read  the  specified  file  as  well  as
>   /etc/hosts.  If  --no-hosts  is  given,  read only the specified
>   file. This option may be repeated for more than  one  additional
>   hosts  file.  If  a  directory is given, then read all the files
>   contained in that directory.
> 
>--hostsdir=
>   Read all the hosts files contained  in  the  directory.  New  or
>   changed  files  are  read automatically. See --dhcp-hostsdir for
>   details.
> ---
> 
> According to the above description, the --addn-hosts can do all the
> things done by  --hostsdir,

No.

The difference is
   New or changed files are read automatically.



Groeten
Geert Stappers
-- 
Leven en laten leven

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss


[Dnsmasq-discuss] --addn-hosts and --hostsdir

2019-10-01 Thread Hongyi Zhao
Hi,

The manpage said that:

---
  -H, --addn-hosts=
  Additional hosts file.  Read  the  specified  file  as  well  as
  /etc/hosts.  If  --no-hosts  is  given,  read only the specified
  file. This option may be repeated for more than  one  additional
  hosts  file.  If  a  directory is given, then read all the files
  contained in that directory.

   --hostsdir=
  Read all the hosts files contained  in  the  directory.  New  or
  changed  files  are  read automatically. See --dhcp-hostsdir for
  details.
---

According to the above description, the --addn-hosts can do all the
things done by  --hostsdir, why still we also have both options?

-- 
Hongsheng Zhao 
Institute of Semiconductors, Chinese Academy of Sciences
GnuPG DSA: 0xD108493

___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss