diff options
author | jilles <jilles@FreeBSD.org> | 2015-10-27 20:58:14 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2015-10-27 20:58:14 +0000 |
commit | 45602cd37fb23343d88d6a0d19bf25cc8eb78db3 (patch) | |
tree | 7cfbabbb6b2b28b9c2fab9db8f2e8962a5602e64 /etc | |
parent | bff6260e9693ab2384e92fcb007f10ab59f7f92e (diff) | |
download | FreeBSD-src-45602cd37fb23343d88d6a0d19bf25cc8eb78db3.zip FreeBSD-src-45602cd37fb23343d88d6a0d19bf25cc8eb78db3.tar.gz |
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)
Diffstat (limited to 'etc')
-rw-r--r-- | etc/rc.subr | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/rc.subr b/etc/rc.subr index 37ca95e..b908f1b 100644 --- a/etc/rc.subr +++ b/etc/rc.subr @@ -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" |