<div dir="ltr"><div class="gmail_extra"><div><div class="gmail_signature" data-smartmail="gmail_signature"><br></div></div><div class="gmail_quote">On Tue, May 30, 2017 at 8:02 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <p>Well, it sort of works that way.  The issue now is it is logging
      it twice.  Which doesn't make sense to me in any way.  I only
      posted half the 'if' statement, but logically the else shouldn't
      matter.  Why is /on commit/ logging 2 (and sometimes 3) entries
      for one DHCPACK?  </p></div></blockquote><div>That is really strange.  I am not seeing that behavior on my server.</div><div><br></div><div>-- </div><div>Bob Harold</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF"><div><div class="h5">
    <div class="m_-8264275917798972206moz-cite-prefix">On 05/26/2017 03:23 PM, Bob Harold
      wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="ltr">
        <div class="gmail_extra"><br>
          <div class="gmail_quote">On Fri, May 26, 2017 at 3:08 PM, 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">Okay, let me see if I get this straight, I
                should wrap the entire if statement inside an 'on commit
                {}' block?  </div>
              <div class="gmail_extra"><br>
              </div>
            </blockquote>
            <div><br>
            </div>
            <div>Yes</div>
            <div><br>
            </div>
            <div>on commit {<br>
            </div>
            <div>
              <div style="color:rgb(80,0,80)">if exists agent.circuit-id</div>
              <div style="color:rgb(80,0,80)"> {</div>
              <div style="color:rgb(80,0,80)">        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 style="color:rgb(80,0,80)"> }</div>
            </div>
            <div style="color:rgb(80,0,80)">}</div>
            <div><br>
            </div>
            <div>-- </div>
            <div>Bob Harold</div>
            <div> </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
              <div class="gmail_extra">
                <div class="gmail_quote">
                  <div>
                    <div class="m_-8264275917798972206gmail-h5">On Fri, May 26, 2017 at 2:56
                      PM, Bob Harold <span dir="ltr"><<a href="mailto:rharolde@umich.edu" target="_blank">rharolde@umich.edu</a>></span>
                      wrote:<br>
                    </div>
                  </div>
                  <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
                    <div>
                      <div class="m_-8264275917798972206gmail-h5">
                        <div dir="ltr">
                          <div class="gmail_extra">
                            <div>
                              <div class="m_-8264275917798972206gmail-m_-5883850886535837351m_-402397338453452373gmail_signature"><br>
                              </div>
                            </div>
                            <div class="gmail_quote">
                              <div>
                                <div class="m_-8264275917798972206gmail-m_-5883850886535837351h5">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="m_-8264275917798972206gmail-m_-5883850886535837351m_-402397338453452373gmail-HOEnZb"><font color="#888888">
                                            <div><br>
                                            </div>
                                            <div><br>
                                            </div>
                                            -- <br>
                                            <div class="m_-8264275917798972206gmail-m_-5883850886535837351m_-402397338453452373gmail-m_5648744568293500219gmail_signature">
                                              <div dir="ltr">
                                                <table style="font-size:small;max-width:100%" width="100%" border="0" cellspacing="0" cellpadding="0">
                                                  <tbody>
                                                    <tr>
                                                      <td rowspan="3" style="vertical-align:top;padding-right:15px;padding-top:5px;max-width:75px" valign="top"><img alt="photo" style="vertical-align:initial;border-radius:4px;max-width:75px" width="50" height="37"></td>
                                                      <td style="vertical-align:top" valign="top">
                                                        <table border="0" cellspacing="0" cellpadding="0">
                                                          <tbody>
                                                          <tr>
                                                          <td style="padding-bottom:5px">
                                                          <table 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" width="100%" border="0" cellspacing="0" cellpadding="0">
                                                          <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 style="line-height:1.6;font-family:Verdana,Arial,sans-serif;font-size:11px;color:rgb(78,75,76);padding-left:2px;width:325px" width="100%" border="0" cellspacing="0" cellpadding="0">
                                                          <tbody>
                                                          <tr>
                                                          <td style="line-height:18px"><span style="display:inline-block;white-space:nowrap"><a href="tel:%28919%29%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><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>
                              </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>
                              <span class="m_-8264275917798972206gmail-m_-5883850886535837351HOEnZb"><font color="#888888">
                                  <div><br>
                                  </div>
                                  <div>-- </div>
                                  <div>Bob Harold</div>
                                  <div> </div>
                                </font></span></div>
                          </div>
                        </div>
                        <br>
                      </div>
                    </div>
                    ______________________________<wbr>_________________<br>
                    dhcp-users mailing list<br>
                    <a href="mailto:dhcp-users@lists.isc.org" target="_blank">dhcp-users@lists.isc.org</a><br>
                    <a href="https://lists.isc.org/mailman/listinfo/dhcp-users" rel="noreferrer" target="_blank">https://lists.isc.org/mailman/<wbr>listinfo/dhcp-users</a><br>
                  </blockquote>
                </div>
                <span class="m_-8264275917798972206gmail-"><br>
                  <br clear="all">
                  <div><br>
                  </div>
                  -- <br>
                  <div class="m_-8264275917798972206gmail-m_-5883850886535837351gmail_signature">
                    <div dir="ltr">
                      <div class="m_-8264275917798972206gmail-m_-5883850886535837351gmail_signature">
                        <div dir="ltr">
                          <table style="font-size:small;max-width:100%" width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tbody>
                              <tr>
                                <td rowspan="3" style="vertical-align:top;padding-right:15px;padding-top:5px;max-width:75px" valign="top"><img alt="photo" style="vertical-align:initial;border-radius:4px;max-width:75px" width="50" height="37"></td>
                                <td style="vertical-align:top" valign="top">
                                  <table border="0" cellspacing="0" cellpadding="0">
                                    <tbody>
                                      <tr>
                                        <td style="padding-bottom:5px">
                                          <table 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" width="100%" border="0" cellspacing="0" cellpadding="0">
                                            <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 style="line-height:1.6;font-family:Verdana,Arial,sans-serif;font-size:11px;color:rgb(78,75,76);padding-left:2px;width:325px" width="100%" border="0" cellspacing="0" cellpadding="0">
                                            <tbody>
                                              <tr>
                                                <td style="line-height:18px"><span style="display:inline-block;white-space:nowrap"><a href="tel:%28919%29%20460-3330" value="+19194603330" style="color:rgb(17,85,204)" target="_blank">919-460-3330</a> (opt
                                                    1) • <a href="mailto:mark.haney@neonova.net" style="color:rgb(78,75,76);text-decoration:none" target="_blank">mark.haney@neonova.net</a></span><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>
                    </div>
                  </div>
                </span></div>
            </blockquote>
          </div>
          </div></div><fieldset class="m_-8264275917798972206mimeAttachmentHeader"><br></fieldset></blockquote></div></div></div></blockquote></div><br></div></div>