Skip to content

Commit 1e05f43

Browse files
committed
remove redundant group existence checks in entrypoint script
1 parent 66832da commit 1e05f43

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

docker/simple-container/entrypoint.sh

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,6 @@ API_GROUP=${API_USER_GROUP:-clab_api}
66
ADMIN_GROUP=${SUPERUSER_GROUP:-clab_admins}
77
REQUIRED_LOGIN_GROUP="clab_admins"
88

9-
echo "Ensuring internal groups exist: $REQUIRED_LOGIN_GROUP, $API_GROUP, $ADMIN_GROUP"
10-
if ! getent group "$REQUIRED_LOGIN_GROUP" > /dev/null; then
11-
addgroup --system "$REQUIRED_LOGIN_GROUP" || addgroup "$REQUIRED_LOGIN_GROUP"
12-
echo "INFO: Ensured group $REQUIRED_LOGIN_GROUP exists"
13-
fi
14-
if ! getent group "$API_GROUP" > /dev/null; then
15-
addgroup --system "$API_GROUP" || addgroup "$API_GROUP"
16-
echo "INFO: Ensured group $API_GROUP exists"
17-
fi
18-
if ! getent group "$ADMIN_GROUP" > /dev/null; then
19-
addgroup --system "$ADMIN_GROUP" || addgroup "$ADMIN_GROUP"
20-
echo "INFO: Ensured group $ADMIN_GROUP exists"
21-
fi
22-
239
# Setup labs directory
2410
SHARED_LABS_DIR=${CLAB_SHARED_LABS_DIR:-/opt/containerlab/labs}
2511
echo "Setting up labs directory: $SHARED_LABS_DIR"

0 commit comments

Comments
 (0)