forked from ungleich-public/cdist
__user_groups: Support OpenBSD
OpenBSD's usermod(8) interface is similary to NetBSD's. This commit makes __user_groups support it explicitly. https://man.openbsd.org/usermod.8 http://netbsd.gw.com/cgi-bin/man-cgi?usermod++NetBSD-current
This commit is contained in:
parent
f4c4ba7267
commit
0e3c7545cc
1 changed files with 2 additions and 2 deletions
|
@ -42,10 +42,10 @@ if [ -z "$changed_groups" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
for group in $changed_groups; do
|
for group in $changed_groups; do
|
||||||
if [ "$os" = "netbsd" ]; then
|
if [ "$os" = "netbsd" ] || [ "$os" = "openbsd" ]; then
|
||||||
case "$state_should" in
|
case "$state_should" in
|
||||||
present) echo "usermod -G \"$group\" \"$user\"" ;;
|
present) echo "usermod -G \"$group\" \"$user\"" ;;
|
||||||
absent) echo 'NetBSD does not have a command to remove a user from a group' >&2 ; exit 1 ;;
|
absent) echo 'NetBSD and OpenBSD do not have a command to remove a user from a group' >&2 ; exit 1 ;;
|
||||||
esac
|
esac
|
||||||
elif [ "$os" = "freebsd" ]; then
|
elif [ "$os" = "freebsd" ]; then
|
||||||
case "$state_should" in
|
case "$state_should" in
|
||||||
|
|
Loading…
Reference in a new issue