mirror of
https://github.com/casjaysdevdocker/deno
synced 2025-01-18 06:34:25 -05:00
🗃️ Committing everything that changed 🗃️
rootfs/usr/local/etc/docker/functions/entrypoint.sh
This commit is contained in:
parent
a366a088be
commit
607e3c158d
@ -396,14 +396,10 @@ __set_user_group_id() {
|
|||||||
local set_gid="${3:-${SERVICE_GID:-10000}}"
|
local set_gid="${3:-${SERVICE_GID:-10000}}"
|
||||||
local random_id="$(__generate_random_uids)"
|
local random_id="$(__generate_random_uids)"
|
||||||
local exitStatus=0
|
local exitStatus=0
|
||||||
[ -n "$set_user" ] && [ -n "$set_uid" ] && [ -n "$set_gid" ] || return
|
|
||||||
[ -n "$set_user" ] && [ "$set_user" != "root" ] || return
|
[ -n "$set_user" ] && [ "$set_user" != "root" ] || return
|
||||||
if [ -z "$set_uid" ] || [ "$set_uid" = "0" ]; then
|
{ [ -n "$set_uid" ] && [ "$set_uid" != "0" ]; } || return
|
||||||
set_uid="$random_id"
|
{ [ -n "$set_gid" ] && [ "$set_gid" != "0" ]; } || return
|
||||||
fi
|
[ -n "$set_user" ] && [ -n "$set_uid" ] && [ -n "$set_gid" ] || return
|
||||||
if [ -z "$set_gid" ] || [ "$set_gid" = "0" ]; then
|
|
||||||
set_gid="$random_id"
|
|
||||||
fi
|
|
||||||
if grep -sq "^$set_user:" "/etc/passwd" "/etc/group"; then
|
if grep -sq "^$set_user:" "/etc/passwd" "/etc/group"; then
|
||||||
if ! grep -sq "x:.*:$set_gid:" "/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
|
groupmod -g "${set_gid}" $set_user | tee -p -a "${LOG_DIR/tmp/}/init.txt" &>/dev/null
|
||||||
|
Loading…
x
Reference in New Issue
Block a user