30-all-groups 324 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
#!/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