HomeFreeBSD

rc: improve NAME_setup handling

Description

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

(cherry picked from commit 11333dd580b704fb4ff0836e1d1a0634099b0cf6)

Details

Provenance
franco_opnsense.orgAuthored on May 24 2024, 4:38 PM
markjCommitted on Aug 14 2025, 1:41 PM
Parents
rGe71d494c600e: aio: Fix a race in sys_aio_cancel()
Branches
Unknown
Tags
Unknown