mkimage-profiles/features.in/build-distro/rootfs/image-scripts.d/30-all-groups

14 lines
324 B
Bash
Executable File

#!/bin/sh -eu
# ensure that all the necesary system groups exist
echo '/usr/share/install3/default-groups
/etc/alterator/auth/user-groups
/etc/alterator/auth/admin-groups' \
| while read LIST; do
[ -s "$LIST" ] || continue
for GROUP in $(cat "$LIST"); do
groupadd -r "$GROUP" &>/dev/null ||:
done
done