From 5dbf664a04294a7900e12807e798c57f3630ecb3 Mon Sep 17 00:00:00 2001 From: casjay Date: Sun, 3 Sep 2023 19:24:48 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=83=EF=B8=8F=20Committing=20everything?= =?UTF-8?q?=20that=20changed=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 | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/rootfs/usr/local/etc/docker/functions/entrypoint.sh b/rootfs/usr/local/etc/docker/functions/entrypoint.sh index cc54694..d889cdc 100755 --- a/rootfs/usr/local/etc/docker/functions/entrypoint.sh +++ b/rootfs/usr/local/etc/docker/functions/entrypoint.sh @@ -396,14 +396,10 @@ __set_user_group_id() { local set_gid="${3:-${SERVICE_GID:-10000}}" local random_id="$(__generate_random_uids)" local exitStatus=0 - [ -n "$set_user" ] && [ -n "$set_uid" ] && [ -n "$set_gid" ] || return [ -n "$set_user" ] && [ "$set_user" != "root" ] || return - if [ -z "$set_uid" ] || [ "$set_uid" = "0" ]; then - set_uid="$random_id" - fi - if [ -z "$set_gid" ] || [ "$set_gid" = "0" ]; then - set_gid="$random_id" - fi + { [ -n "$set_uid" ] && [ "$set_uid" != "0" ]; } || return + { [ -n "$set_gid" ] && [ "$set_gid" != "0" ]; } || return + [ -n "$set_user" ] && [ -n "$set_uid" ] && [ -n "$set_gid" ] || return if grep -sq "^$set_user:" "/etc/passwd" "/etc/group"; then if ! grep -sq "x:.*:$set_gid:" "/etc/group"; then groupmod -g "${set_gid}" $set_user | tee -p -a "${LOG_DIR/tmp/}/init.txt" &>/dev/null