<div dir="ltr"><div class="gmail_extra"><div><div class="gmail_signature"><br></div></div><div class="gmail_quote">On Fri, May 26, 2017 at 11:38 AM, Mark Haney <span dir="ltr"><<a href="mailto:mark.haney@neonova.net" target="_blank">mark.haney@neonova.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">We've got a custom log entry created that's based on whether the agent.circuit-id exists.  The problem is that the circuit-id gets included in DHCPDISCOVER and DHCPOFFER, so we're getting duplicate custom messages logged.  <div><br></div><div>What we want to do it create this custom log file, with the circuit-id only on the DHCPACK.  The log creation params are below.  We use this so that customers can get a web interface view of the current leases.  </div><div><br></div><div>Is there a way to do this with the latest CentOS 6 dhcpd package?</div><div><br></div><div>----</div><div><div>if exists agent.circuit-id</div><div> {</div><div>        log (info, concat( "DHCPUSER:,", concat (suffix (concat ("0", binary-to-ascii (16, 8, "", substring( hardware, 1, 1))),2), ":", suffix (concat ("0", binary-to-ascii (16, 8, "",substring( hardware, 2, 1))),2), ":", suffix (concat ("0", binary-to-ascii(16, 8, "", substring( hardware, 3, 1))),2), ":", suffix (concat ("0", binary-to-ascii (16, 8, "", substring( hardware, 4, 1))),2),":", suffix (concat ("0", binary-to-ascii (16, 8, "", substring( hardware, 5, 1))),2), ":", suffix (concat ("0", binary-to-ascii (16, 8, "", substring( hardware, 6, 1))),2)), ",IP:,", binary-to-ascii (10, 8, ".", leased-address), ",CID:,", option agent.circuit-id));</div><div> }</div><span class="gmail-HOEnZb"><font color="#888888"><div><br></div><div><br></div>-- <br><div class="gmail-m_5648744568293500219gmail_signature"><div dir="ltr"><table width="100%" border="0" cellspacing="0" cellpadding="0" style="font-size:small;max-width:100%"><tbody><tr><td valign="top" rowspan="3" style="vertical-align:top;padding-right:15px;padding-top:5px;max-width:75px"><img width="50" height="37" alt="photo" style="vertical-align: initial; border-radius: 4px; max-width: 75px;"></td><td valign="top" style="vertical-align:top"><table border="0" cellspacing="0" cellpadding="0"><tbody><tr><td style="padding-bottom:5px"><table width="100%" border="0" cellspacing="0" cellpadding="0" style="line-height:1.6;font-family:Verdana,Arial,sans-serif;font-size:11px;color:rgb(78,75,76);padding-left:2px;width:322.8px"><tbody><tr><td><span style="margin:0px;padding:0px;color:rgb(23,80,131);font-size:15px">Mark Haney</span><br>Network Engineer at NeoNova</td></tr></tbody></table></td></tr><tr><td style="padding:5px 0px 8px;border-top:1px solid gray"><table width="100%" border="0" cellspacing="0" cellpadding="0" style="line-height:1.6;font-family:Verdana,Arial,sans-serif;font-size:11px;color:rgb(78,75,76);padding-left:2px;width:325px"><tbody><tr><td style="line-height:18px"><span style="display:inline-block;white-space:nowrap"><a href="tel:(919)%20460-3330" value="+19194603330" style="color:rgb(17,85,204)" target="_blank">919-460-3330</a> (opt 1) • <a href="http://matt@neonova.net/" style="color:rgb(78,75,76);text-decoration:none" target="_blank">mark.haney@neonova.net</a></span><b></b><br><span style="display:inline-block;white-space:nowrap"><a href="https://neonova.net/" style="color:rgb(78,75,76);text-decoration:none" target="_blank">www.neonova.net</a></span>  <a href="https://www.facebook.com/NeoNovaNNS/" style="color:rgb(17,85,204)" target="_blank"><img width="10" height="10"></a> <a href="https://twitter.com/NeoNova_NNS" style="color:rgb(17,85,204)" target="_blank"><img width="10" height="10"></a> <a href="http://www.linkedin.com/company/neonova-network-services" style="color:rgb(17,85,204)" target="_blank"><img width="10" height="10"></a></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></div></div></font></span></div></div><br></blockquote><div><br></div><div>Try wrapping that with:</div><div>   on commit {</div><div>   ...</div><div>   }</div><div><br></div><div>Then it should only happen once, when the lease is granted.</div><div><br></div><div>-- </div><div>Bob Harold</div><div> </div></div></div></div>