Extracting lease end time on commit

Ian Anderson ianand0204 at gmail.com
Tue May 29 16:44:47 UTC 2012


on commit {
  execute("/usr/local/bin/dhcp-tracker/dhcpevent", "commit",
concat(option dhcp-client-identifier, ",", binary-to-ascii(10, 8, ".",
leased-address), ",", binary-to-ascii(16, 8, ":", substring(hardware,
1, 6)), ",", option vendor-class-identifier, ",",
pick-first-value(option host-name, host-decl-name, config-option
host-name, noname)));
}

Is there a way to get the lease end time via "on commit" stanzas?  I
noticed in dhcp.options there is dhcp-lease-time, and in dhcp-eval
they reference lease-time but dhcpd logs a "bad argument" when I try
to pass that to my 'dhcpevent' script.  Any pointers would be
appreciated.


More information about the dhcp-users mailing list