This repository has been archived on 2026-05-18. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
disco/balls/groups/scripts/00-makegroups.sh

27 lines
579 B
Bash
Raw Permalink Normal View History

#!/bin/bash
########################
# 00-makegroups.sh
#
# Make linux groups for the 'group' disco ball
# Each group is represented as a key under ${HOSTNAME}/groups, with the value
# of each key being a list of groupadd/groupmod compatible command line flags
# that are passed, one each, directly into groupmod/groupadd
########################
HOSTNAME=$(hostname)
RETVAL=0
for op in present absent
do
for groupname in $(disco-param keys ${HOSTNAME}/groups/${op})
do
disco-linux-ents group $groupname $op
RETVAL=$(expr $RETVAL + $?)
done
done
exit $RETVAL