Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 10 Apr 2018 14:04:11 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r332368 - in stable/11/etc: . defaults
Message-ID:  <201804101404.w3AE4BVw078210@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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=:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804101404.w3AE4BVw078210>