[Dnsmasq-discuss] SIGHUP and external script

richardvoigt at gmail.com richardvoigt at gmail.com
Sat Jul 7 04:34:03 BST 2007


Simon,

Would it be possible to add some logic to resync with the external database
when SIGHUP is received?

I propose the following set of rules:
rerun external-script "init"
any lease in the external database, which does not match any mac address in
the internal list, is added to the internal list (unless it has expired,
then use external-script "del")
any lease in the external database, which matches the MAC address in the
internal list but a different IP address, is removed with external-script
"del"
any lease in the external database, which matches both MAC address and IP
address in the internal list, is updated with external-script "old"
any lease in the internal list not found in the external database is added
in the external database with external-script "add"

Would this be possible?  Any complications or undesired behavior you can
see?

Right now, spanning tree protocol and its "learning" states are playing
havoc with my external-script "init", because the postgresql server isn't
reachable when dnsmasq starts.  I'll work on a solution to that
independently, but it would be really nice to be able to resync the external
database any time connectivity is lost and then restored.

Thanks,
Ben Voigt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20070706/f609bd31/attachment.htm


More information about the Dnsmasq-discuss mailing list