mirror of
git://git.code.sf.net/p/dhcpd-pools/code
synced 2025-12-16 07:47:00 +00:00
output: allow alarming, in case of success, be silent
This will allow runnign dhcpd with cron, and when nothing is wrong emails will not be sent. Proposed-by: Dan Pritts <danno@umich.edu> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
This commit is contained in:
parent
c0e7b50bd3
commit
9f676f5276
1 changed files with 4 additions and 1 deletions
|
|
@ -1071,7 +1071,10 @@ int output_alarming(void)
|
||||||
program_name);
|
program_name);
|
||||||
} else {
|
} else {
|
||||||
ret_val = 0;
|
ret_val = 0;
|
||||||
fprintf(outfile, "OK: ");
|
if (config.output_limit[1] & BIT3)
|
||||||
|
fprintf(outfile, "OK: ");
|
||||||
|
else
|
||||||
|
return ret_val;
|
||||||
}
|
}
|
||||||
if (config.output_limit[0] & BIT1) {
|
if (config.output_limit[0] & BIT1) {
|
||||||
fprintf(outfile, "Ranges; crit: %d warn: %d ok: %d ", rc, rw,
|
fprintf(outfile, "Ranges; crit: %d warn: %d ok: %d ", rc, rw,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue