summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorjilles <jilles@FreeBSD.org>2015-08-01 22:00:25 +0000
committerjilles <jilles@FreeBSD.org>2015-08-01 22:00:25 +0000
commit5c500bdd461620dbc3e3a94f960619c74621f08d (patch)
tree507f83882682c3e987285eb66c09b85f1609a397 /etc
parent04346b458f03cd1a46a2f92c69eb63c59a045481 (diff)
downloadFreeBSD-src-5c500bdd461620dbc3e3a94f960619c74621f08d.zip
FreeBSD-src-5c500bdd461620dbc3e3a94f960619c74621f08d.tar.gz
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) MFC after: 1 week
Diffstat (limited to 'etc')
-rw-r--r--etc/rc.subr3
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/rc.subr b/etc/rc.subr
index 7b1e387..914d17f 100644
--- a/etc/rc.subr
+++ b/etc/rc.subr
@@ -1333,7 +1333,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"
OpenPOWER on IntegriCloud