Fix __group type failing with --gid
The command `echo -- -g` prints `-- -g` so the generated `groupadd` command was syntactically incorrect and failing. Solution was to remove `--` since echo command does not understand it, and add instead an extra space before `-g` to avoid echo interpreting it as a flag.
This commit is contained in:
parent
f8fbcdf2a7
commit
2cae33f6d6
1 changed files with 3 additions and 3 deletions
|
@ -30,9 +30,9 @@ state="$(cat "$__object/parameter/state")"
|
||||||
# Use short option names for portability
|
# Use short option names for portability
|
||||||
shorten_property() {
|
shorten_property() {
|
||||||
case "$1" in
|
case "$1" in
|
||||||
gid) echo -- "-g";;
|
gid) echo " -g";;
|
||||||
password) echo -- "-p";;
|
password) echo " -p";;
|
||||||
system) echo -- "-r";;
|
system) echo " -r";;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue