svn commit: r290062 - stable/10/etc

Jilles Tjoelker jilles at FreeBSD.org
Tue Oct 27 20:58:15 UTC 2015


Author: jilles
Date: Tue Oct 27 20:58:14 2015
New Revision: 290062
URL: https://svnweb.freebsd.org/changeset/base/290062

Log:
  MFC r286163: rc.subr: Allow rc.conf.d with multi-directory local_startup.
  
  I also changed ${...%*/rc.d} to ${...%/rc.d} since the shortest match always
  has an empty string for the asterisk.
  
  PR:		201641
  Submitted by:	Jamie Landeg-Jones (original version)

Modified:
  stable/10/etc/rc.subr
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/etc/rc.subr
==============================================================================
--- stable/10/etc/rc.subr	Tue Oct 27 20:56:57 2015	(r290061)
+++ stable/10/etc/rc.subr	Tue Oct 27 20:58:14 2015	(r290062)
@@ -1335,7 +1335,8 @@ load_rc_config()
 	# If a service name was specified, attempt to load
 	# service-specific configuration
 	if [ -n "$_name" ] ; then
-		for _d in /etc ${local_startup%*/rc.d}; do
+		for _d in /etc ${local_startup}; do
+			_d=${_d%/rc.d}
 			if [ -f ${_d}/rc.conf.d/"$_name" ]; then
 				debug "Sourcing ${_d}/rc.conf.d/$_name"
 				. ${_d}/rc.conf.d/"$_name"


More information about the svn-src-stable-10 mailing list