mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-22 11:14:18 +01:00
Move fetch of DEBUG_SH from kenv to rc
We only need to check kenv for DEBUG_SH once. We also need to export DEBUG_SH to be useful. Sponsored by: Juniper Networks, Inc. Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D46219
This commit is contained in:
parent
2b4aa2816c
commit
6502c60c22
@ -72,6 +72,11 @@ set -o verify
|
||||
set +o verify
|
||||
load_rc_config $rc_config_xtra
|
||||
|
||||
if have DebugOn; then
|
||||
# allow DEBUG_SH to be set from loader prompt
|
||||
export DEBUG_SH=${DEBUG_SH:-$(kenv -q DEBUG_SH)}
|
||||
fi
|
||||
|
||||
# If we receive a SIGALRM, re-source /etc/rc.conf; this allows rc.d
|
||||
# scripts to perform "boot-time configuration" including enabling and
|
||||
# disabling rc.d scripts which appear later in the boot order.
|
||||
|
@ -2767,10 +2767,7 @@ $_DEBUG_SH vdot /libexec/debug.sh
|
||||
|
||||
# Ensure we can still operate if debug.sh and
|
||||
# safe_eval.sh are not found.
|
||||
if have DebugOn; then
|
||||
# allow DEBUG_SH to be set from loader prompt
|
||||
DEBUG_SH=${DEBUG_SH:-$(kenv -q DEBUG_SH)}
|
||||
else
|
||||
if ! have DebugOn; then
|
||||
DebugOn() { return 0; }
|
||||
DebugOff() { return 0; }
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user