Skip to content

Commit

Permalink
confd: adjust path to failure-config
Browse files Browse the repository at this point in the history
Signed-off-by: Joachim Wiberg <[email protected]>
  • Loading branch information
troglobit committed Oct 30, 2023
1 parent ab86506 commit 07a8b6b
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/confd/bin/load
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 07a8b6b

Please sign in to comment.