From c09eeca49145b034df6527c500099ba22f28e824 Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Fri, 30 Oct 2015 12:32:32 -0500 Subject: 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. --- sh/openrc-run.sh.in | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sh') 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" -- cgit v1.2.3