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.
This commit is contained in:
William Hubbs
2015-10-30 12:32:32 -05:00
parent 4cf6b0ecf7
commit c09eeca491
3 changed files with 110 additions and 0 deletions

View File

@@ -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"