From d4d559323819c8a5279bf197d8d3ff80f1e28cdc Mon Sep 17 00:00:00 2001 From: William Hubbs Date: Mon, 5 Sep 2016 11:20:03 -0500 Subject: sh/openrc-run.sh: read global configuration settings first X-Gentoo-Bug: 503134 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=503134 --- sh/openrc-run.sh.in | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'sh/openrc-run.sh.in') diff --git a/sh/openrc-run.sh.in b/sh/openrc-run.sh.in index ce5432f8..4cbfb162 100644 --- a/sh/openrc-run.sh.in +++ b/sh/openrc-run.sh.in @@ -193,6 +193,15 @@ status() yesno $RC_DEBUG && set -x +# Load configuration settings. First the global ones, then any +# service-specific settings. +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 + _conf_d=${RC_SERVICE%/*}/../conf.d # If we're net.eth0 or openvpn.work then load net or openvpn config _c=${RC_SVCNAME%%.*} @@ -209,15 +218,6 @@ if ! sourcex -e "$_conf_d/$RC_SVCNAME.$RC_RUNLEVEL"; then fi 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/runit.sh" sourcex "@LIBEXECDIR@/sh/s6.sh" -- cgit v1.2.3