aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2015-12-09 12:38:10 -0600
committerWilliam Hubbs <w.d.hubbs@gmail.com>2015-12-09 12:38:10 -0600
commitcc9c23c8484ea7d07b1f8e54bcab46cc31ec727d (patch)
tree1891d9d7fa1ae194b4a9e597eaafc59386e15e2d /sh
parent935252b1152b4086ccbe76ace21e677d7ac8a357 (diff)
Complete support for rc.conf.d
- gendepends.sh needs to read this directory to allow dependencies to be overridden - init.sh for Linux and Bsd need to read it to allow config settings they use to be overridden.
Diffstat (limited to 'sh')
-rw-r--r--sh/gendepends.sh.in5
-rw-r--r--sh/init.sh.BSD.in5
-rw-r--r--sh/init.sh.Linux.in5
3 files changed, 15 insertions, 0 deletions
diff --git a/sh/gendepends.sh.in b/sh/gendepends.sh.in
index 2ab798d9..79a4bfff 100644
--- a/sh/gendepends.sh.in
+++ b/sh/gendepends.sh.in
@@ -96,6 +96,11 @@ do
fi
[ -e @SYSCONFDIR@/rc.conf ] && . @SYSCONFDIR@/rc.conf
+ if [ -d "@SYSCONFDIR@/rc.conf.d" ]; then
+ for _f in "@SYSCONFDIR@"/rc.conf.d/*.conf; do
+ [ -e "$_f" ] && . "$_f"
+ done
+ fi
if . "$_dir/$RC_SVCNAME"; then
echo "$RC_SVCNAME" >&3
diff --git a/sh/init.sh.BSD.in b/sh/init.sh.BSD.in
index 2a53dcd8..5912a95a 100644
--- a/sh/init.sh.BSD.in
+++ b/sh/init.sh.BSD.in
@@ -23,6 +23,11 @@ mount_svcdir()
. "$RC_LIBEXECDIR"/sh/functions.sh
[ -r "@SYSCONFDIR@/rc.conf" ] && . "@SYSCONFDIR@/rc.conf"
+if [ -d "@SYSCONFDIR@/rc.conf.d" ]; then
+ for _f in "@SYSCONFDIR@"/rc.conf.d/*.conf; do
+ [ -r "$_f" ] && . "$_f"
+ done
+fi
# Disable devd until we need it
if [ -z "$RC_SYS" -a "$RC_UNAME" = "FreeBSD" ]; then
diff --git a/sh/init.sh.Linux.in b/sh/init.sh.Linux.in
index a8ee69ea..7d36e7aa 100644
--- a/sh/init.sh.Linux.in
+++ b/sh/init.sh.Linux.in
@@ -5,6 +5,11 @@
. "$RC_LIBEXECDIR"/sh/functions.sh
[ -r "@SYSCONFDIR@/rc.conf" ] && . "@SYSCONFDIR@/rc.conf"
+if [ -d "@SYSCONFDIR@/rc.conf.d" ]; then
+ for _f in "@SYSCONFDIR@"/rc.conf.d/*.conf; do
+ [ -e "$_f" ] && . "$_f"
+ done
+fi
# By default VServer already has /proc mounted, but OpenVZ does not!
# However, some of our users have an old proc image in /proc