-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Simon,
> Are you aware that dnsmasq already has a facility to call an external > script when the DHCP lease database changes? It may be that extending > this to use DBus is a better approach than simply emiting "raw" protocol > events. Would that work for you putative application? You are quite right, using dhcp-script with the attached script is sufficient and the resulting information is more useful. However, what I liked with using a patch was: a/ it builds upon your existing uk.org.thekelleys.dnsmasq DBUS interface and works "out of the box" b/ it doesn't hog the dhcp-script option. To my knowledge you can only have a single dhcp-script option or am I mistaken? Would you consider a patch if it was rewritten so that it's triggered in the same codepath as the dhcp-script handling? If you don't think it's appropriate, feel free to close this bug. Cheers, Jeremy -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkjR7j8ACgkQ4mJJZqJp2ScoLQCfTtqUaYesvluMeojyOk3ZcrAp nfQAn2+PDmIc9EUiq01ZdIqGBUJ4Ym7u =7VV7 -----END PGP SIGNATURE-----
#!/bin/sh # When a DHCP lease is added or deleted, announce it over DBUS. DBUS_PATH=/uk/org/thekelleys/dnsmasq DBUS_IFACE=uk.org.thekelleys.dnsmasq case "$1" in add) dbus-send --system $DBUS_PATH $DBUS_IFACE.AddDhcp string:"$2" string:"$3" string:"$4" ;; del) dbus-send --system $DBUS_PATH $DBUS_IFACE.DelDhcp string:"$2" string:"$3" string:"$4" ;; esac