Subject: | Not able to parse the class object content from the dhcpd.conf file |
Current code is not able to parse 'class' object, My dhcpd.conf has the
following piece of codes
class "pxeclients" {
match if substring(option vendor-class-identifier,0,9) ="PXEClient";
next-server 10.201.214.90;
}
class "virtual-machines" {
match if ((substring (hardware, 1, 3) = 00:0c:29)
or (substring (hardware, 1, 3) = 00:50:56)
or (substring (option dhcp-client-identifier, 0, 3) = "HPC"));
}
But when I use the following code,
my $config = Net::ISC::DHCPd::Config->new(
file => '/etc/dhcpd.conf',
);
# parse the config
$config->parse;
pring $config->generate;
Output related class objects
or (substring (option dhcp-client-identifier, 0, 3) = "HPC"));
or (substring (hardware, 1, 3) = e1:6c:d6) );
Regards,
Johnson