Skip to content

Commit ecba083

Browse files
committed
Remove adding users to the group as setfacl is responsible on it
1 parent 047bea7 commit ecba083

1 file changed

Lines changed: 0 additions & 27 deletions

File tree

container/debian/podcvd-setup

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -137,31 +137,4 @@ else
137137
sudo usermod --add-subuids "$id_range" --add-subgids "$id_range" "$username"
138138
fi
139139

140-
# 8. Add users to groups owning device nodes
141-
echo "Adding user to the device node owning groups..."
142-
devices=("/dev/kvm" "/dev/vhost-net" "/dev/vhost-vsock")
143-
groups_to_add=()
144-
for dev in "${devices[@]}"; do
145-
if [ ! -e "$dev" ]; then
146-
echo "Error: Required device $dev does not exist."
147-
exit 1
148-
fi
149-
group=$(stat -c "%G" "$dev")
150-
if [[ -z "$group" || "$group" == "root" ]]; then
151-
echo "Error: Invalid group name of $dev to add user into the group."
152-
exit 1
153-
fi
154-
if ! id -nG "$username" | grep -qw "$group"; then
155-
groups_to_add+=("$group")
156-
fi
157-
done
158-
if [ ${#groups_to_add[@]} -gt 0 ]; then
159-
unique_groups=($(echo "${groups_to_add[@]}" | tr ' ' '\n' | sort -u | tr '\n' ' '))
160-
for unique_group in "${unique_groups[@]}"; do
161-
sudo usermod -aG "$unique_group" "$username"
162-
done
163-
echo "Warning: Please reboot the machine (or log out and log back in) before using podcvd."
164-
echo "Your current session does not have active membership in all required device groups."
165-
fi
166-
167140
echo "Setup complete! You can now run 'podcvd'."

0 commit comments

Comments
 (0)