opnsense-src/libexec/rc
Tijl Coosemans 6b17d944a1 rc.d/sendmail: Fix error with some configurations
The sendmail startup script can run 4 daemons: sendmail, sendmail_submit,
sendmail_outbound, and sendmail_msp_queue.  Of the first 3 at most one
can be enabled.  There's a run_rc_command call for each and the ones for
sendmail and sendmail_msp_queue run unconditionally.  For some rc
commands this triggers warnings or errors when sendmail_enable="NO" or
sendmail_msp_queue_enable="NO".  Since d2e7bb630b these errors are
propagated and the whole script fails.

Fix this by first determining which daemons are enabled, setting ${name}
and ${rcvar} accordingly, and then always calling run_rc_command
conditionally.

Also replace ${name}.cf with sendmail.cf because ${name} isn't always
sendmail.

PR:		282585
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D47757
2024-12-03 11:46:39 +01:00
..
rc.d rc.d/sendmail: Fix error with some configurations 2024-12-03 11:46:39 +01:00
tests rc/tests: Skip oomprotect tests in a jail 2024-10-14 12:30:23 +02:00
debug.sh debug.sh check for :debug_add: 2024-11-04 12:30:01 -08:00
hooks.sh debug.sh take advantage of hooks.sh 2024-09-10 12:04:15 -07:00
Makefile debug.sh take advantage of hooks.sh 2024-09-10 12:04:15 -07:00
netstart libexec: Remove ancient SCCS tags. 2023-11-26 22:23:28 -07:00
network.subr rc: network.subr update consitency with older change (v6/v4 order) 2024-09-05 19:53:57 +00:00
pccard_ether Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
rc Move fetch of DEBUG_SH from kenv to rc 2024-08-03 10:56:48 -07:00
rc.bsdextended Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
rc.conf rc.conf: Update commented examples for lo0 to use CIDR 2024-11-25 10:14:33 -05:00
rc.firewall Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
rc.initdiskless man filesystems: fix more xrefs after move to s4 2024-06-27 18:32:05 -06:00
rc.resume Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
rc.shutdown Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
rc.subr rc: Remove rc_fast_and_loose 2024-10-28 22:10:49 +01:00
rc.suspend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
safe_eval.sh safe_dot check file is a file 2024-08-16 13:15:20 -07:00