#!/bin/sh set -e # system groups GROUP_DIR="/usr/share/lliurex-base-files/groups/" if [ -d "$GROUP_DIR" ] ; then find "$GROUP_DIR" -xtype f -exec cat {} \; |while read line ; do if [ "$line" ] ; then line="${line%:}" lNAME="${line%%:*}" lGID="${line##*:}" fi addgroup --system --quiet --gid "$lGID" "$lNAME" || true done # TODO: think the way to update network (ldap) groups also ... fi exit 0