From 61db3c92587dfd4a546446491051fe7a80773fd5 Mon Sep 17 00:00:00 2001 From: Kalibh Halford Date: Thu, 14 May 2026 08:41:30 +0100 Subject: [PATCH] BUG: Don't fail if wheel exists As we have used set -e the script will fail on any error. This is safe and good practice but groupadd wheel normally fails as the group already exists. By adding the or operator || we can bypass the set -e and allow the script to continue. --- os_builders/roles/nubes_bootcontext/files/update_cloud_users.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os_builders/roles/nubes_bootcontext/files/update_cloud_users.sh b/os_builders/roles/nubes_bootcontext/files/update_cloud_users.sh index 06cbe710..332ab5ed 100644 --- a/os_builders/roles/nubes_bootcontext/files/update_cloud_users.sh +++ b/os_builders/roles/nubes_bootcontext/files/update_cloud_users.sh @@ -51,7 +51,7 @@ fi SSH_PUBLIC_KEY=$(jq -r .keys[0].data /mnt/context/openstack/latest/meta_data.json) -groupadd wheel +getent group wheel > /dev/null || groupadd wheel id -u "$FEDID" || useradd "$FEDID" -g wheel -m -s /bin/bash usermod "$FEDID" -a -G wheel,cloud