opnsense-src/libexec/rc
Simon J. Gerraty 7e1c014a9e debug.sh take advantage of hooks.sh
Allow Debug{On,Off} to run associated hooks.
This makes it feasible to collect extra debug info at runtime
without needing to modify any potentially verified and hence immutable
scripts.

Like debug.sh, hooks.sh is extremely handy and used extensively
in many parts of Junos and its build environment.
It is provided here in the hope that others may benefit.

We do not dot hooks.sh by default to reduce overhead, but it can
but done from rc.conf et al using

$_HOOKS_SH . /libexec/hooks.sh

to avoid including more than once.

Reviewed by:	stevek
Sponsored by:	Juniper Networks, Inc.
Differential Revision:	https://reviews.freebsd.org/D46552
2024-09-10 12:04:15 -07:00
..
rc.d rc.d/devmatch: Silence sysctl hw.bus.devctl_nomatch_enabled=1 2024-08-29 00:26:26 +01:00
tests spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD 2023-05-12 10:44:03 -06:00
debug.sh debug.sh take advantage of hooks.sh 2024-09-10 12:04:15 -07: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 dhclient: rc.conf option to disable ARP resolution 2024-08-09 14:49:51 -07: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.subr: ensure run_rc_script return code is not masked by DebugOff 2024-09-10 14:58:47 -04: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