HomeFreeBSD

debug.sh take advantage of hooks.sh

Description

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

Details

Provenance
sjgAuthored on Tue, Sep 10, 7:04 PM
Reviewer
stevek
Differential Revision
D46552: debug.sh take advantage of hooks.sh
Parents
rGb5f6beefa00a: rc.subr: ensure run_rc_script return code is not masked by DebugOff
Branches
Unknown
Tags
Unknown