aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/chkey/(public-mirror)
diff options
context:
space:
mode:
authorMateusz Piotrowski <0mp@FreeBSD.org>2024-10-21 10:10:52 +0000
committerMateusz Piotrowski <0mp@FreeBSD.org>2024-10-21 19:20:36 +0000
commitd2e7bb630b83848a774d8213014a9e0747775019 (patch)
tree95ebef00409cc2af56cca8d43658cb8edbc762d3 /usr.bin/chkey/(public-mirror)
parent0e3a211961014e0991a54f583b2866ac19ed0e76 (diff)
downloadsrc-main.tar.gz
src-main.zip
rc.d/sendmail: Return non-zero if the daemon fails to start or is not runningHEADmain
If you have a mail server that is running sendmail daemon (sendmail_enable=YES) and sendmail queue runner (sendmail_msp_queue=YES) and the sendmail daemon dies, /etc/rc.d/sendmail status does see the daemon is not running but returns 0 as the exit code. This prevents other programs (like puppet) from restarting sendmail to fix the issue. Make sure that the exit code is propagated towards the end of the script if any of the sendmail services fail. This patch does not call exit directly but instead just sets the exit status code by calling exit in a subshell. This way we do not exit the current shell in case the service script is sourced (e.g., when rc_fast_and_loose is active). PR: 223132 MFC after: 2 weeks Reported by: pirzyk Discussed with: jilles, eugen Reviewed by: christos, gshapiro (previous version), markj Approved by: christos (mentor), markj (mentor) Differential Revision: https://reviews.freebsd.org/D46862 Co-authored-by: Jim Pirzyk <pirzyk@FreeBSD.org>
Diffstat (limited to 'usr.bin/chkey/(public-mirror)')
0 files changed, 0 insertions, 0 deletions