[Dnsmasq-discuss] Reading the dhcp.leases file

Sam Weber samweber01 at gmail.com
Sat Feb 11 22:06:55 GMT 2017


In our system, when a change occurs to the DNS entries we want dnsmasq to
respond to, we scan the directory of active entries and then grep the
dhcp.leases file to see if the entry exists there.  If the entry is not
found in the leases file, we omit it.  Once the scan and check is
completed, we write a new hosts file and then send SIGHUP to dnsmasq so it
knows to read the new file.  This works well most of the time.  Sometimes,
however, a perfectly valid entry is not found in the dhcp.leases file so we
incorrectly omit the entry from the dnsmasq hosts file.  We can see that
the leases file gets written very often in our system, and we think that
sometimes we must be reading the leases file whilst dnsmasq is writing it,
resulting in our reading the file when a value of interest has not yet been
written.  Is this idea of our sometimes reading an incomplete leases file a
possibility?  Is there a workaround other than reading the leases file
several times?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20170211/0d4b310d/attachment.html>


More information about the Dnsmasq-discuss mailing list