freebsd-src/libexec/rc
Franco Fichtner 11333dd580 rc: improve NAME_setup handling
Reload is used for service reconfiguration as well
and lacks a NAME_prepend-like mechanism so it makes
sense to extend the NAME_reload hook into this
action.

precmd may use configuration checks and blocks setup
from doing its designated work (e.g. nginx).  In moving
the invoke of the setup script in front allows us to
provide custom scripts for config file generation and
fixing prior to precmd checking configuration integrity.

Also introduce _run_rc_setup to separate the launcher
from the main one.  Let it run correctly in the case
of restart_precmd and block further execution as
would be the case in start due to the internal plumbing
of restart being split into calling stop and start
afterwards.

Differential-Revsiion: https://reviews.freebsd.org/D36259
Signed-off-by: Franco Fichtner <franco@opnsense.org>
Reviewed by: imp, oshogbo
Pull Request: https://github.com/freebsd/freebsd-src/pull/1258
2024-05-29 11:23:46 -06:00
..
rc.d rc.d: add a service jails config to all base system services 2024-05-22 15:41:49 +02:00
tests spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
debug.sh /etc/rc add trace debug and verify 2024-02-09 09:15:58 -08:00
Makefile /etc/rc add trace debug and verify 2024-02-09 09:15:58 -08:00
netstart libexec: Remove ancient SCCS tags. 2023-11-26 22:23:28 -07:00
network.subr Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
pccard_ether Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
rc /etc/rc add trace debug and verify 2024-02-09 09:15:58 -08:00
rc.bsdextended Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
rc.conf nuageinit: by default to not enable nuageinit 2024-05-14 14:16:45 +02:00
rc.firewall Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
rc.initdiskless rc.initdiskless: Disable soft-updates in mdmfs (again) 2024-03-20 00:54:18 -04: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: improve NAME_setup handling 2024-05-29 11:23:46 -06:00
rc.suspend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
safe_eval.sh rc.subr add Exists so we can find sed 2024-02-12 14:39:20 -08:00