Commit 3cc183dc authored by Leigh B. Stoller's avatar Leigh B. Stoller
Browse files

Look for exit code 1; do not restart since that indicates a syntax

error in the config file, and it would just result in an email storm
as it tries over and over to restart. Just send email and die.
parent f5274aef
......@@ -87,6 +87,16 @@ while (1) {
" Could not exec $DHCPD!\n");
waitpid($childpid, 0);
if (($? >> 8) == 1) {
"$DHCPD died with 1\n".
"Not restarting it; might be a config file error",
unlink $PIDFILE;
die("*** $0:\n".
" Could not start $DHCPD! Might be a config file error.\n");
# Anytime it exits, send email.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment