dhcp restart with bad config
- Date: Tue, 29 Aug 2017 15:01:12 +0000
- From: Bonno Bloksma <b.bloksma@xxxxxx>
- Subject: dhcp restart with bad config
Today I had a small (big?) problem with the DHCP server.
When I make any changes I allways do a
# service isc-dhcp-server restart
to test the new config. In the past when there was an error in the config the service would keep running using the previous config.
This was achieved by doing a config test before the service stop.
On my old Wheezy machine the /etc/init.d/isc-dhcp-server file has the segment(s)
if ! /usr/sbin/dhcpd -t $OPTIONS -q -cf "$DHCPD_CONF" > /dev/null 2>&1; then
echo "dhcpd self-test failed. Please fix $DHCPD_CONF."
echo "The error was: "
/usr/sbin/dhcpd -t $OPTIONS -cf "$DHCPD_CONF"
restart | force-reload)
if [ "$?" != "0" ]; then
Where a failed test_config will result in stopping the restart.
On my Jessie DHCP servers this safeguard no longer seems to be present.
After a typo in the config my DHCP server stopped and did not come up until I fixed the typo and (re)started the service. Which took a while as I got disturbed and the change was not urgent and I assumed the service was still running :-(
Is there any way to get the old functionality back?