From 727c79f489e03a5673a5a764fe0bafd23cc84dbb Mon Sep 17 00:00:00 2001 From: Loraine Gueguen Date: Mon, 22 May 2023 11:54:01 +0200 Subject: [PATCH] fix array variables --- scripts/pre-launch.d/08script_user | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/pre-launch.d/08script_user b/scripts/pre-launch.d/08script_user index 04c8045..dd82e1a 100755 --- a/scripts/pre-launch.d/08script_user +++ b/scripts/pre-launch.d/08script_user @@ -9,8 +9,8 @@ if [ -n "$OTHER_GID" ]; then length=${#OTHER_GID_ARRAY[@]} 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]," + 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]}," done otherGIDoption=${GROUPS::-1} fi