[Dnsmasq-discuss] Set environment variable for dhcp-script

Daniel Weller danielweller at masterpeaceltd.com
Thu Aug 9 21:38:33 BST 2018


Hello,

I am trying to set an environment variable from inside dnsmasq- giving the script being called by dhcp-script access to that variable. I think the location to do this is inside helper.c in the create_helper() function. However, when it forks I am unable to follow the child process in my debugger. I have tried setting "set follow-fork-mode <mode>" & "set detach-on-fork <mode>" but after the process forks- it seems to just hang and never be called.

Also I've got my local variable inside the lease struct and passed to queue_script() in helper.c.

Any ideas how to debug the dhcp-script child process or where I should set the environment variable to allow the script called by dhcp-script to read this environment variable?

Thank you,

Daniel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20180809/39d052bf/attachment.html>


More information about the Dnsmasq-discuss mailing list