aboutsummaryrefslogtreecommitdiff
path: root/etc/rc.subr
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2016-12-01 04:35:41 +0000
committerWarner Losh <imp@FreeBSD.org>2016-12-01 04:35:41 +0000
commit5ad34286cd84f109221be08ff58a0b3b16c9c6fb (patch)
treed60923d8dc4307f00ce21ecd930eb5768c523c4a /etc/rc.subr
parent4d00d13c3eacf38b7fb49cc38055b5cf618a4664 (diff)
downloadsrc-5ad34286cd84f109221be08ff58a0b3b16c9c6fb.tar.gz
src-5ad34286cd84f109221be08ff58a0b3b16c9c6fb.zip
If the kenv variable rc_debug is set, turn on rc_debug.
Notes
Notes: svn path=/head/; revision=309350
Diffstat (limited to 'etc/rc.subr')
-rw-r--r--etc/rc.subr6
1 files changed, 6 insertions, 0 deletions
diff --git a/etc/rc.subr b/etc/rc.subr
index 57154604028d..3630af6acd74 100644
--- a/etc/rc.subr
+++ b/etc/rc.subr
@@ -2119,6 +2119,12 @@ _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.a
+if kenv -q rc.debug > /dev/null ; then
+ rc_debug=YES
+fi
+
fi # [ -z "${_rc_subr_loaded}" ]
_rc_subr_loaded=: