diff options
| author | Kyle Evans <kevans@FreeBSD.org> | 2018-04-10 14:04:11 +0000 |
|---|---|---|
| committer | Kyle Evans <kevans@FreeBSD.org> | 2018-04-10 14:04:11 +0000 |
| commit | 95dc9c2d9868f0176fbca45ec43ff1badd9a6b6e (patch) | |
| tree | aa3e34050ea3720f8dd85e5f115925a5cff99800 /etc | |
| parent | a06bbb7dc44c360b75260d794da90f58402543a2 (diff) | |
Notes
Diffstat (limited to 'etc')
| -rw-r--r-- | etc/defaults/rc.conf | 2 | ||||
| -rw-r--r-- | etc/rc.subr | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/etc/defaults/rc.conf b/etc/defaults/rc.conf index d19db3a80fdef..ca5bb63c7ccbc 100644 --- a/etc/defaults/rc.conf +++ b/etc/defaults/rc.conf @@ -21,6 +21,8 @@ ### Important initial Boot-time options #################### ############################################################## +# rc_debug can't be set here without interferring with rc.subr's setting it +# when the kenv variable rc.debug is set. #rc_debug="NO" # Set to YES to enable debugging output from rc.d rc_info="NO" # Enables display of informational messages at boot. rc_startmsgs="YES" # Show "Starting foo:" messages at boot diff --git a/etc/rc.subr b/etc/rc.subr index 2552c91f92177..1ec0b3e01ef1f 100644 --- a/etc/rc.subr +++ b/etc/rc.subr @@ -2166,6 +2166,13 @@ _echoonce() esac } +# If the loader env variable rc.debug is set, turn on debugging. rc.conf will +# still override this, but /etc/defaults/rc.conf can't unconditionally set this +# since it would undo what we've done here. +if kenv -q rc.debug > /dev/null ; then + rc_debug=YES +fi + fi # [ -z "${_rc_subr_loaded}" ] _rc_subr_loaded=: |
