Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
brainfood
/
inkluster-dev
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
4d4ae7bb
authored
2025-01-22 11:08:35 -0600
by
Adam Heath
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Minor speed tweaks to entrypoint.
1 parent
7ca798ec
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
entrypoint.sh
entrypoint.sh
View file @
4d4ae7b
...
...
@@ -2,20 +2,22 @@
set
-e
tool_uid
=
"
$(
id -u tool
)
"
tool_gid
=
"
$(
id -g tool
)
"
tool_uid
=
tool_gid
=
adjust_tool_uid_gid
()
{
declare
usermod_args
=()
groupmod_args
=()
declare
-a
new_groups
=()
if
[[
$MAP_UID
]]
;
then
[[
$(
id -u tool
)
-ne
$MAP_UID
]]
&&
usermod_args+
=(
-u
$MAP_UID
)
[[
$tool_uid
-ne
$MAP_UID
]]
&&
usermod_args+
=(
-u
$MAP_UID
)
tool_uid
=
"
$MAP_UID
"
fi
if
[[
$MAP_GROUPS
]]
;
then
set
--
$MAP_GROUPS
if
[[
$tool_gid
-ne
$1
]]
;
then
groupmod_args
=(
-g
"
$1
"
)
tool_gid
=
"
$1
"
fi
shift
for
group
in
"
$@
"
;
do
...
...
@@ -76,13 +78,14 @@ configure_cache() {
chown -h tool:tool
"/home/tool/.cache"
}
# TODO: Save /run/user between calls
mkdir -p /run/user/
$tool_uid
tool_uid
=
"
$(
id -u tool
)
"
tool_gid
=
"
$(
id -g tool
)
"
adjust_tool_uid_gid
tool_uid
=
"
$(
id -u tool
)
"
tool_gid
=
"
$(
id -g tool
)
"
# TODO: Save /run/user between calls
mkdir -p /run/user/
$tool_uid
run_state
=
"/run/user/
$tool_uid
/inkluster-dev"
if
[[
! -d
$run_state
]]
;
then
...
...
Please
register
or
sign in
to post a comment