aboutsummaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2015-10-30 12:32:32 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2015-11-05 10:40:24 -0600
commitc09eeca49145b034df6527c500099ba22f28e824 (patch)
tree255b5cf66de8257a44eb5f799c6e3b03c7871ca5 /sh
parent4cf6b0ecf7f5b35a6d80d76c60e77c3e1c7fee5c (diff)
Add rc.conf.d support
This makes it possible to override settings in rc.conf by adding a directory @SYSCONFDIR@/rc.conf.d and putting files in this directory. The files will be processed in lexical order, and the last setting in these files will be used.
Diffstat (limited to 'sh')
-rw-r--r--sh/openrc-run.sh.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/sh/openrc-run.sh.in b/sh/openrc-run.sh.in
index 8aba4e0e..749af2cc 100644
--- a/sh/openrc-run.sh.in
+++ b/sh/openrc-run.sh.in
@@ -184,6 +184,12 @@ unset _conf_d
# Load any system overrides
sourcex -e "@SYSCONFDIR@/rc.conf"
+if [ -d "@SYSCONFDIR@/rc.conf.d" ]; then
+ for _f in "@SYSCONFDIR@"/rc.conf.d/*.conf; do
+ sourcex -e "$_f"
+ done
+fi
+
# load service supervisor functions
sourcex "@LIBEXECDIR@/sh/s6.sh"