We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0315ec5 commit aa6a219Copy full SHA for aa6a219
type/__group/gencode-remote/groupmod.sh
@@ -35,7 +35,20 @@ shorten_groupmod_property() {
35
properties_to_groupmod_argv() {
36
for __group_prop in "$@"
37
do
38
- __groupmod_opt=$(shorten_groupmod_property "${__group_prop%%=*}")
+ # we need to shorten options for both groupmod and groupadd since on
39
+ # some systems (such as *BSD, Darwin) those commands do not handle
40
+ # GNU-style long options.
41
+ case ${__group_prop%%=*}
42
+ in
43
+ (gid)
44
+ __groupmod_opt='-g' ;;
45
+ (password)
46
+ __groupmod_opt='-p' ;;
47
+ (system)
48
+ __groupmod_opt='-r' ;;
49
+ (*)
50
+ return 1 ;;
51
+ esac
52
53
case ${__groupmod_opt-},${__group_prop-}
54
in
0 commit comments