can dhcpd keep working when encountering a syntax error

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

can dhcpd keep working when encountering a syntax error

Pat Dery
Hi

is it possible to configure dhcpd to keep working when the dhcpd.conf
contains a syntax error

for example if someone enters the mac address : aa:bb:cc:dd:ee:gg by mistake

at reload the whole service stops and can't restart until someone corrects
the error

we would like it if it would continue serving ip and reporting the error in
the log file

maybe a major warning in the log instead of stopping , something like that

thanks



--
Sent from: http://isc-dhcp-users.2343191.n4.nabble.com/
_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: can dhcpd keep working when encountering a syntax error

Philippe Maechler
we use the -t option (syntax check) to check if the conf file looks ok and if so, then we restart the service. if the syntax is not ok, we report the error by mail

the downside to this is, that the daemon reports the copyright notice and an unexpirienced worker tought, that there is a problem because the service was so often restarted. we did adjust the logging and now everything works fine

hth
philippe

Pat Dery <[hidden email]> schrieb am Mi., 2. Sept. 2020, 17:25:
Hi

is it possible to configure dhcpd to keep working when the dhcpd.conf
contains a syntax error

for example if someone enters the mac address : aa:bb:cc:dd:ee:gg by mistake

at reload the whole service stops and can't restart until someone corrects
the error

we would like it if it would continue serving ip and reporting the error in
the log file

maybe a major warning in the log instead of stopping , something like that

thanks



--
Sent from: http://isc-dhcp-users.2343191.n4.nabble.com/
_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users

_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: can dhcpd keep working when encountering a syntax error

Bruce Hudson
In reply to this post by Pat Dery
On Wed, Sep 02, 2020 at 10:24:48AM -0500, Pat Dery wrote:
 
> is it possible to configure dhcpd to keep working when the dhcpd.conf
> contains a syntax error

    The usual way to do this would be to create a script for restarting
the DHCP server. Then, before restarting the server, use the "-t" option
to test the configuration file. If the test fails, exit and leave the
old version running.
 
--
Bruce A. Hudson | [hidden email]
ITS, Networks and Systems |
Dalhousie University |
Halifax, Nova Scotia, Canada | (902) 494-3405
_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users
Reply | Threaded
Open this post in threaded view
|

Re: can dhcpd keep working when encountering a syntax error

Pat Dery
good idea

thanks

pat



--
Sent from: http://isc-dhcp-users.2343191.n4.nabble.com/
_______________________________________________
ISC funds the development of this software with paid support subscriptions. Contact us at https://www.isc.org/contact/ for more information.

dhcp-users mailing list
[hidden email]
https://lists.isc.org/mailman/listinfo/dhcp-users