Including external config files to dhcpd config
I am setting up a dhcp server on RHEL where some of the entries in the file are generated at a later stage and may be regenerated often. I was looking at the dhcpd config guide and the include <filename>; guideline seems to be the best approach for this.
But looks like dhcp server doesn't load the external file at all. Here's me dhcpd.conf: Code:
default-lease-time 86400; # 24 hours in seconds Code:
subnet 10.64.0.0 netmask 255.255.255.0 { Code:
2019-02-09T15:19:07.493576+00:00 dhcp-01.erewhon.com <daemon.err> dhcpd: DHCPDISCOVER from 00:50:56:8c:0e:fd via eth0: network 192.200.1.0/24: no free leases Any help would be appreciated to make dhcp include the external config file. |
I don't consider myself an expert in dhcpd.conf syntax, but have you tried moving the include statement to the end of the file?
Just to ensure not even the obvious is forgotten: You did restart the dhcpd after modifying the include file, right? |
Yes. I did both. I also removed the include statement and pasted it’s contents directly in dhcpd.conf to validate the config and it worked.
|
I would think the idea is to test changes to your dhcp setup. Once done the daemon will be restarted manually after the edit. If so why not edit a duplicate file copy the old to a backup file the new to the dhcp config file restart the daemon to check it if worked. Everything but the editing can be done with a shell script that does the backup, copy and restart of the daemon in one command. If you wanted to automate the procedure running a cron job to run the script file will work for that.
|
All times are GMT -5. The time now is 06:46 PM. |