include statement

Hai Tao taoh666 at yahoo.com
Mon Dec 18 21:56:41 UTC 2006


you are right. I copied the include files to /var/lib/dhcp/etc/, and it works. thanks!
   
  one more question, I want to use a wildcard to refer to all the files under a folder, but the dhcpd.conf doesn't allow me to do this.
   
  for example, if I use
   
  include "/etc/dhcpsubnets/*"
   
  I will get a error that there is no etc/dhcpsubnets/* found. 
   
  Is there any idea that how I can get through this? thanks!
  
Michael <michael at kmaclub.com> 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/libnss_dns.so.2,
# /lib/libresolv.so.2) 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/dhcpd.pid.
#
DHCPD_RUN_CHROOTED="yes"


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 , then the 
dhcpd.conf file would include /etc/include.

Michael








More information about the dhcp-users mailing list