include statement

Hai Tao taoh666 at
Tue Dec 19 16:15:33 UTC 2006

a strange thing happened:
  I created /etc/subnets/ to hold all my subnet files
  and in my dhcpd.conf
  include "/etc/subnets/1"
  include "/etc/subnets/2"
  I also config the /etc/sysconfig/dhcpd, partially as
  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/.
  Is there any idea that I can get through this? My purpose is to make config change in /etc/dhcpd.conf and /etc/subnets/, and restart by using rcdhcpd to make it take effect.
Michael <michael at> wrote:
  Hai Tao wrote:
> how can I know if it runs in a chroot'ed environment?
> Michael wrote: Hai Tao wrote:

I don't know for sure on SLES 10. However, on SLES 9, the configuration 
for DHCPD is in /etc/sysconfig/dhcpd. In that file is a section like:

## Type: yesno
## Default: yes
## ServiceRestart: dhcpd
# Shall the DHCP server dhcpd run in a chroot jail (/var/lib/dhcp)?
# Each time you start dhcpd with the init script, /etc/dhcpd.conf will
# be copied to /var/lib/dhcp/etc/.
# Some files that are important for hostname to IP address resolution
# (/etc/{hosts,host.conf,resolv.conf,localtime}, /lib/,
# /lib/ will also be copied to the chroot jail by the
# init script when you start it (about 100kB altogether).
# The pid file will be in /var/lib/dhcp/var/run/

So in this situation, your include would have to be below /var/lib/dhcp 
and the path would have to be relative to it. 

For example, if your include file is /var/lib/dhcp/etc/include, then the 
dhcpd.conf file would include /etc/include.


More information about the dhcp-users mailing list