<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">I am trying to pass a DHCP header value that is read from the client DHCP request- to the file being called by dhcp-script=<file>. The easiest way to do that I think is to set an environment variable that the dhcp-script=<file>
has access to while executing. <br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Thanks,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Daniel<br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<div id="Signature">
<div id="divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri, Arial, Helvetica, sans-serif, "EmojiFont", "Apple Color Emoji", "Segoe UI Emoji", NotoColorEmoji, "Segoe UI Symbol", "Android Emoji", EmojiSymbols;">
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Dnsmasq-discuss <dnsmasq-discuss-bounces@lists.thekelleys.org.uk> on behalf of Geert Stappers <stappers@stappers.nl><br>
<b>Sent:</b> Friday, August 10, 2018 1:51:26 AM<br>
<b>To:</b> dnsmasq-discuss@lists.thekelleys.org.uk<br>
<b>Subject:</b> Re: [Dnsmasq-discuss] Set environment variable for dhcp-script</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On Thu, Aug 09, 2018 at 08:38:33PM +0000, Daniel Weller wrote:<br>
> Hello,<br>
> <br>
> I am trying to set an environment variable from inside dnsmasq- giving<br>
> the script being called by dhcp-script access to that variable. I<br>
> think the location to do this is inside helper.c in the create_helper()<br>
> function. However, when it forks I am unable to follow the child process<br>
> in my debugger. I have tried setting "set follow-fork-mode <mode>" &<br>
> "set detach-on-fork <mode>" but after the process forks- it seems to<br>
> just hang and never be called.<br>
> <br>
> Also I've got my local variable inside the lease struct and passed to<br>
> queue_script() in helper.c.<br>
> <br>
> Any ideas how to debug the dhcp-script child process or where I should<br>
> set the environment variable to allow the script called by dhcp-script<br>
> to read this environment variable?<br>
<br>
What is the original problem?<br>
<br>
<br>
Groeten<br>
Geert Stappers<br>
-- <br>
Leven en laten leven<br>
<br>
_______________________________________________<br>
Dnsmasq-discuss mailing list<br>
Dnsmasq-discuss@lists.thekelleys.org.uk<br>
<a href="http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss">http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss</a><br>
</div>
</span></font></div>
</body>
</html>