<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 9, 2015 at 11:49 PM, Simon Kelley <span dir="ltr"><<a href="mailto:simon@thekelleys.org.uk" target="_blank">simon@thekelleys.org.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div id=":26x" class="" style="overflow:hidden">You should see something like<br>
<br>
dnsmasq: inotify, new or changed file /tmp/hosts/testone<br>
dnsmasq: read /tmp/hosts/testone - 1 addresses<br>
<br>
Just to check the argument to hostsdir is a directory, and not a file?<br>
<br>
Any errors logged at startup?</div></blockquote></div><br>Simon,</div><div class="gmail_extra"><br></div><div class="gmail_extra">I used the config like this:</div><div class="gmail_extra"><br></div><div class="gmail_extra">---------dnsmasq.conf----------</div><div class="gmail_extra">...</div><div class="gmail_extra"><div class="gmail_extra">dhcp-hostsdir=/etc/hosts.dhcps/</div><div class="gmail_extra">dhcp-optsdir=/etc/hosts.options/</div><div class="gmail_extra">hostsdir=/etc/hosts.dnss/</div><div class="gmail_extra">...</div><div class="gmail_extra">----------end---------</div><div>-bash-4.1# ls /etc/hosts.dnss/<br></div><div><div>fa:cd:42:cf:50:00  fa:ed:12:0d:ad:00</div></div><div><br></div><div><div>-bash-4.1# cat /etc/hosts.dnss/*</div><div>10.11.30.33 <a href="http://10-11-30-33.test1.org">10-11-30-33.test1.org</a></div><div>10.11.109.127 <a href="http://10-11-109-127.test1.org">10-11-109-127.test1.org</a></div><div><br></div></div><div><br></div><div>From the dnsmasq.log:<br></div><div><div>-bash-4.1# tail -f /var/log/dnsmasq.log </div><div>Feb 10 15:49:56 dnsmasq[24347]: started, version 2.73test5-12-g2941d3a cachesize 150</div><div>Feb 10 15:49:56 dnsmasq[24347]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset auth no-DNSSEC loop-detect inotify</div><div>Feb 10 15:49:56 dnsmasq-dhcp[24347]: DHCP, static leases only on 10.11.0.1, lease time 1h</div><div>Feb 10 15:49:56 dnsmasq[24347]: reading /etc/resolv.conf</div><div>Feb 10 15:49:56 dnsmasq[24347]: using nameserver 10.0.101.1#53</div><div>Feb 10 15:49:56 dnsmasq[24347]: cleared cache</div><div>Feb 10 15:49:56 dnsmasq-dhcp[24347]: read /etc/hosts.options//fa:ed:12:0d:ad:00</div><div>Feb 10 15:49:56 dnsmasq-dhcp[24347]: read /etc/hosts.options//fa:cd:42:cf:50:00</div><div>Feb 10 15:49:56 dnsmasq-dhcp[24347]: read /etc/hosts.dhcps//fa:ed:12:0d:ad:00</div><div>Feb 10 15:49:56 dnsmasq-dhcp[24347]: read /etc/hosts.dhcps//fa:cd:42:cf:50:00</div><div><br></div><div>Feb 10 15:50:27 dnsmasq[24347]: inotify, new or changed file /etc/hosts.dhcps//fa:ec:59:d0:15:00</div><div>Feb 10 15:50:27 dnsmasq-dhcp[24347]: read /etc/hosts.dhcps//fa:ec:59:d0:15:00</div><div>Feb 10 15:50:27 dnsmasq[24347]: inotify, new or changed file /etc/hosts.options//fa:ec:59:d0:15:00</div><div>Feb 10 15:50:27 dnsmasq-dhcp[24347]: read /etc/hosts.options//fa:ec:59:d0:15:00</div><div><br></div></div><div><br></div><div>The last 4 lines show a new VM is added, configs in dhcp-hostsdir and dhcp-optsdir are found. </div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Yongkang You</div>
</div></div>