use include statement in a nested block

Loris Boillet lb at
Thu Apr 29 15:25:51 UTC 2010

(please keep CC as I am not subscribed to this list)


I would like to use the include statement to move the range declaration of a subnet to a separate file:

in dhcpd.conf:
        pool {  
                max-lease-time 7200;
                default-lease-time 7200;
                include "/home/nice/etc/dhcpd.range";
                get-lease-hostnames true;

in the included file:

but then configuration file parsing fails (see below).

Including the whole subnet works but it does not match my needs. Should the include statement work in a nested block? Is there a way to move the range declaration without including the whole subnet?



# /etc/init.d/dhcp3-server restart
dhcpd self-test failed. Please fix the config file.
The error was: 
Internet Systems Consortium DHCP Server V3.1.1
Copyright 2004-2008 Internet Systems Consortium.
All rights reserved.
For info, please visit
/home/nice/etc/dhcpd.range line 11: range declaration not allowed here.
/etc/dhcp3/dhcpd.conf line 15: /home/nice/etc/dhcpd.range: bad parse.
                include "/home/nice/etc/dhcpd.range"
/etc/dhcp3/dhcpd.conf line 17: Pool declaration with no address range.
Pool declarations must always contain at least
one range statement.
Configuration file errors encountered -- exiting

More information about the dhcp-users mailing list