Skip to content

Commit

Permalink
fix groups variable
Browse files Browse the repository at this point in the history
  • Loading branch information
loraine-gueguen committed May 22, 2023
1 parent 727c79f commit 820ff01
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/pre-launch.d/08script_user
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ if [ -n "$OTHER_GID" ]; then
IFS=',' read -ra OTHER_GID_ARRAY <<< "$OTHER_GID"
IFS=',' read -ra OTHER_RUN_GROUP_ARRAY <<< "$OTHER_RUN_GROUP"
length=${#OTHER_GID_ARRAY[@]}
GROUPS="--groups "
groups="--groups "
for (( i=0; i<$length; i++ )); do
getent group ${OTHER_RUN_GROUP_ARRAY[i]} &> /dev/null || groupadd --gid ${OTHER_GID_ARRAY[i]} ${OTHER_RUN_GROUP_ARRAY[i]}
GROUPS+="${OTHER_GID_ARRAY[i]},"
groups+="${OTHER_GID_ARRAY[i]},"
done
otherGIDoption=${GROUPS::-1}
otherGIDoption=${groups::-1}
fi

if [ -n "$UID" ]; then
Expand Down

0 comments on commit 820ff01

Please sign in to comment.