Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2023-06-11 18:45:23 +0200
committerErich Eckner <git@eckner.net>2023-06-11 18:45:23 +0200
commit71d3bddf40149879617d1d6343c83e9ae6514151 (patch)
tree158b3543cfb2f6875a828ea8467bf0537c611932 /lib
parent60fd162d7b33a33a9c4c1a22a3b2a1f9298327e1 (diff)
extract path to configuration into variable
* prepare for overwriting location of configuration dir
Diffstat (limited to 'lib')
-rwxr-xr-xlib/load-configuration14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/load-configuration b/lib/load-configuration
index 22b6608..ca1a713 100755
--- a/lib/load-configuration
+++ b/lib/load-configuration
@@ -141,21 +141,23 @@ fi
# possibly pull in custom modifications
-if [ -r "${base_dir}/conf/common.conf" ]; then
+conf_dir="${base_dir}/conf"
+
+if [ -r "${conf_dir}/common.conf" ]; then
# shellcheck source=/dev/null
- . "${base_dir}/conf/common.conf"
+ . "${conf_dir}/common.conf"
fi
if ${i_am_the_master} && \
- [ -r "${base_dir}/conf/master.conf" ]; then
+ [ -r "${conf_dir}/master.conf" ]; then
# shellcheck source=/dev/null
- . "${base_dir}/conf/master.conf"
+ . "${conf_dir}/master.conf"
fi
if ! ${i_am_the_master} && \
- [ -r "${base_dir}/conf/slave.conf" ]; then
+ [ -r "${conf_dir}/slave.conf" ]; then
# shellcheck source=../conf/slave.conf.example
- . "${base_dir}/conf/slave.conf"
+ . "${conf_dir}/slave.conf"
fi
# check / set up environment