include statement

Simon Hobson dhcp1 at thehobsons.co.uk
Tue Dec 19 16:54:43 UTC 2006


Hai Tao wrote:

>   I also config the /etc/sysconfig/dhcpd, partially as
>
>   DHCPD_CONF_INCLUDE_FILES="/etc/dhcpsubnets"
>
>   when I start dhcpd by using rcdhcpd start the first time, 
>/etc/dhcpd.conf and /etc/subnets/* were copied to /var/lib/dhcp/etc/.
>
>   then, I added a subnet file under /etc/subnets/, include the file 
>in /etc/dhcpd.conf, and restart the service the second time by using 
>rcdhcpd restart. what happened is that I was told that the new 
>subnet file could not be found. I checked the /var/lib/dhcp/etc/, 
>and found there is a new subnets folder under the existing 
>/var/lib/dhcp/etc/subnets/, containing all the subnet files.but the 
>new added subnet file was not copied to the existing 
>/var/lib/dhcp/etc/subnets/.

My guess is that when you started dhcpd first time, it copied 
"/etc/subnets" as instructed - but next time it didn't because 
/etc/subnets already exists in /var/lib/dhcp.

Try setting DHCPD_CONF_INCLUDE_FILES="/etc/dhcpsubnets/*" and see if 
that does it.

Alternatively, unset that, and create a symlink so that 
/etc/dhcpsubnets is a symlink to /var/lib/dhcp/etc/subnets. Ie, you 
edit the file 'in place' where dhcpd is looking for them, but have an 
easy to remember pointer to them.


More information about the dhcp-users mailing list