svn commit: r332368 - in stable/11/etc: . defaults

Kyle Evans kevans at FreeBSD.org
Tue Apr 10 14:04:12 UTC 2018


Author: kevans
Date: Tue Apr 10 14:04:11 2018
New Revision: 332368
URL: https://svnweb.freebsd.org/changeset/base/332368

Log:
  MFC r309350, r309352
  
  r309350:
  If the kenv variable rc_debug is set, turn on rc_debug.
  
  r309352:
  Finish incomplete comments in prior revision. I was going to fix this
  after I tested it, but didn't.

Modified:
  stable/11/etc/defaults/rc.conf
  stable/11/etc/rc.subr
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/etc/defaults/rc.conf
==============================================================================
--- stable/11/etc/defaults/rc.conf	Tue Apr 10 14:00:45 2018	(r332367)
+++ stable/11/etc/defaults/rc.conf	Tue Apr 10 14:04:11 2018	(r332368)
@@ -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

Modified: stable/11/etc/rc.subr
==============================================================================
--- stable/11/etc/rc.subr	Tue Apr 10 14:00:45 2018	(r332367)
+++ stable/11/etc/rc.subr	Tue Apr 10 14:04:11 2018	(r332368)
@@ -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=:


More information about the svn-src-all mailing list