From 5c500bdd461620dbc3e3a94f960619c74621f08d Mon Sep 17 00:00:00 2001 From: jilles Date: Sat, 1 Aug 2015 22:00:25 +0000 Subject: 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 --- etc/rc.subr | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'etc') 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" -- cgit v1.1