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

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) {
SENDMAIL($TBOPS, "DHCPD died",
"$DHCPD died with 1\n".
"Not restarting it; might be a config file error",
$TBOPS);
unlink $PIDFILE;
die("*** $0:\n".
" Could not start $DHCPD! Might be a config file error.\n");
}
#
# Anytime it exits, send email.
#
......
Markdown is supported
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