From 992bad8d34f0f06436f110dbff5b16da7aea7e6c Mon Sep 17 00:00:00 2001 From: casjay Date: Mon, 29 Jul 2024 18:25:37 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20Fixed:=20rootfs/usr/loc?= =?UTF-8?q?al/etc/docker/functions/entrypoint.sh=20=F0=9F=97=83=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit rootfs/usr/local/etc/docker/functions/entrypoint.sh --- rootfs/usr/local/etc/docker/functions/entrypoint.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rootfs/usr/local/etc/docker/functions/entrypoint.sh b/rootfs/usr/local/etc/docker/functions/entrypoint.sh index 21b90ca..37757d8 100644 --- a/rootfs/usr/local/etc/docker/functions/entrypoint.sh +++ b/rootfs/usr/local/etc/docker/functions/entrypoint.sh @@ -761,19 +761,19 @@ __initialize_system_etc() { local conf_dir="$1" local dir="" local file=() - local directories=() + local directories="" if [ -n "$conf_dir" ] && [ -e "$conf_dir" ]; then - files=("$(find "$conf_dir"/* -not -path '*/env/*' -type f 2>/dev/null | sed 's|'/config/'||g' | sort -u | grep -v '^$' | grep '^' || false)") - directories=("$(find "$conf_dir"/* -not -path '*/env/*' -type d 2>/dev/null | sed 's|'/config/'||g' | sort -u | grep -v '^$' | grep '^' || false)") + files="$(find "$conf_dir"/* -not -path '*/env/*' -type f 2>/dev/null | sed 's|'/config/'||g' | sort -u | grep -v '^$' | grep '^' || false)" + directories="$(find "$conf_dir"/* -not -path '*/env/*' -type d 2>/dev/null | sed 's|'/config/'||g' | sort -u | grep -v '^$' | grep '^' || false)" echo "Copying config files to system: $conf_dir > /etc/${conf_dir//\/config\//}" - if [ -n "${directories[*]}" ]; then - for d in "${directories[@]}"; do + if [ -n "$directories" ]; then + for d in $directories; do dir="/etc/$d" echo "Creating directory: $dir" mkdir -p "$dir" done fi - for f in "${files[@]}"; do + for f in $files; do etc_file="/etc/$f" conf_file="/config/$f" [ -f "$etc_file" ] && rm -Rf "$etc_file"