Closed OlivierHenr closed 9 years ago
Hi,
I think the parser don't manage [ if - else ] statements.
When i use this module : Net::ISC::DHCPd::Config i have to face with a parsing error. After generate the config it miss the last bracket
For exemple after invoking methods $config->parse and $config->generate :
subnet 192.168.1.0 netmask 255.255.255.0 { option routers 192.168.1.1; range 192.168.1.100 192.168.1.200; nex-server 192.168.1.11; if exists user-class and option user-class = "iPXE" { filename "http://192.168.1.11/genese/ipxe/file.ipxe"; } else { filename "file2.kpxe; } } <--- this one will be deleted
I'm not sure if you hand-typed it, but there are typos in your subnet. Change nex-server to next-server if it's important :)
Hi,
I think the parser don't manage [ if - else ] statements.
When i use this module : Net::ISC::DHCPd::Config i have to face with a parsing error. After generate the config it miss the last bracket
For exemple after invoking methods $config->parse and $config->generate :
subnet 192.168.1.0 netmask 255.255.255.0 { option routers 192.168.1.1; range 192.168.1.100 192.168.1.200; nex-server 192.168.1.11; if exists user-class and option user-class = "iPXE" { filename "http://192.168.1.11/genese/ipxe/file.ipxe"; } else { filename "file2.kpxe; } } <--- this one will be deleted