confd: adjust path to failure-config

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2023-10-30 12:48:14 +01:00
committed by Tobias Waldekranz
parent 120e87ac99
commit fc5310b3fd
+12 -6
View File
@@ -15,15 +15,21 @@ if [ "$1" = "-b" ]; then
else
bootstrap=false
fi
config=$1
fn=/cfg/${config}.cfg
if [ -f "$config" ]; then
fn="$config"
else
if [ -f "/cfg/${config}.cfg" ]; then
fn="/cfg/${config}.cfg"
else
fn="/run/confd/${config}.cfg"
fi
fi
if [ ! -f "$fn" ]; then
if [ ! -f "$config" ]; then
logger -sik -p user.error "No such file, $fn, aborting!"
exit 1
fi
fn=$config
logger -sik -p user.error "No such file, $fn, aborting!"
exit 1
fi
if ! sysrepocfg -v3 -I"$fn" -f json; then