Added the groups module to create linux groups, renamed disco-linux-ents to entities

This commit is contained in:
2012-08-23 18:40:06 -04:00
parent 4a5a7abcca
commit e121bc09e1
3 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
#!/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