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?

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

Reply via email to