dhcpd.conf and include option

I’m trying to use an include filename statement in dhcpd.conf.

include "/path/to/file";

Testing the version of dhcpd.conf I’m working with (using dhcpd -t) doesn’t throw up any errors but restarting the daemon comes up with a file not found error.

I see that openSUSE runs the DHCPD server in a chroot jail - how do I set things up so that my included file is automatically copied into that chroot jail?

I’ve never heard of an “include file” in relation to dhcpd.
A quick Google search suggests that the main config file can “include” external files to augment the main config file… Is this what you mean?

“File not found” errors usually mean one of two things…
The file doesn’t exist at the specified location.
The file exists at the specified location but insufficient permission to read the file.


Why cannot you copy it into chroot jail yourself?

I could do, and have done.

But I then have to remember to copy it again if I edit it for some reason. According to the openSUSE docs files are copied to the chroot jail automatically and I was hoping that there was a script or config file specifying which files were copied.
Since the jail (/var/lib/dhcp) includes various files from /etc I’m assuming they get updated as needed (at service restart?) so presumably something looks after that.

Digging around in /etc/syconfig/dhcpd it appears that the contents of /etc/dhcpd.d are copied into the root jail on restart.
Even better symlinks in /etc/dhcpd.d are copied as real files

If you want to include a file in dhcpd.conf, put it or a symlink to it in /etc/dhcpd.d (create the directory if it doesn’t exist)