Skip to content
Snippets Groups Projects
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
No related branches found
No related tags found
No related merge requests found
......@@ -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.
#
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment