I've looked at the code in DHCPLeases/Object.pm and it doesn't appear to be written to handle multi-line event definitions in the lease file, such as I have. example:
lease 10.123.123.123 {
starts 2 2017/10/24 13:35:52;
ends 2 2017/10/24 13:37:52;
tstp 3 2017/03/01 22:29:00;
tsfp 4 2017/03/02 22:14:00;
atsfp 4 2017/03/02 22:14:00;
cltt 2 2017/10/24 13:35:52;
binding state free;
hardware ethernet 00:11:22:aa:bb:cc;
uid "\001\000\025e*6\314";
on expiry {
execute ("/usr/local/bin/saythis",
binary-to-ascii (10, 8, ".", leased-address), "1");
}
on release {
execute ("/usr/local/bin/saythis",
binary-to-ascii (10, 8, ".", leased-address), "2");
}
}
[cid:3440074292_44049292]
François Beaulieu
Bureau: 514.667.0691 poste 2061
Courriel: francois.beaulieu@sbktelecom.com<mailto:francois.beaulieu@sbktelecom.com> | web: www.sbktelecom.com<
http://www.sbktelecom.com/>
On Nov 27, 2017, at 6:34 PM, François Beaulieu <Francois.Beaulieu@sbktelecom.com<mailto:Francois.Beaulieu@sbktelecom.com>> wrote:
Here are examples of the returned error messages when using version 0.9:
Text::DHCPLeases::Object::parse Error: Statement not recognized: on expiry {
at /usr/share/perl5/Text/DHCPLeases.pm line 148.
Text::DHCPLeases::Object::parse Error: Statement not recognized: execute ("/usr/local/bin/echothis",
at /usr/share/perl5/Text/DHCPLeases.pm line 148.
Text::DHCPLeases::Object::parse Error: Statement not recognized: binary-to-ascii (10, 8, ".", leased-address), "1");
at /usr/share/perl5/Text/DHCPLeases.pm line 148.
Text::DHCPLeases::_parse Error: Declaration header not recognized: on release
and when using 1.0:
Text::DHCPLeases::_parse Error: Declaration header not recognized: 'lease 10.2.0.41'