From 2cae33f6d64ad61f4d9679439605f13650d00bae Mon Sep 17 00:00:00 2001 From: Dimitrios Apostolou Date: Sun, 18 Nov 2018 01:30:40 +0100 Subject: [PATCH] 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. --- cdist/conf/type/__group/gencode-remote | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cdist/conf/type/__group/gencode-remote b/cdist/conf/type/__group/gencode-remote index 822619d2..6091c548 100755 --- a/cdist/conf/type/__group/gencode-remote +++ b/cdist/conf/type/__group/gencode-remote @@ -30,9 +30,9 @@ state="$(cat "$__object/parameter/state")" # Use short option names for portability shorten_property() { case "$1" in - gid) echo -- "-g";; - password) echo -- "-p";; - system) echo -- "-r";; + gid) echo " -g";; + password) echo " -p";; + system) echo " -r";; esac }