From 820ff01c1b8d2739a15e8e2b796f69c05eb729ae Mon Sep 17 00:00:00 2001 From: Loraine Gueguen Date: Mon, 22 May 2023 12:24:40 +0200 Subject: [PATCH] fix groups variable --- scripts/pre-launch.d/08script_user | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/pre-launch.d/08script_user b/scripts/pre-launch.d/08script_user index dd82e1a..c390707 100755 --- a/scripts/pre-launch.d/08script_user +++ b/scripts/pre-launch.d/08script_user @@ -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