forked from ungleich-public/cdist
safer quoting
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
parent
c631a609ed
commit
e978542381
1 changed files with 2 additions and 2 deletions
|
@ -55,7 +55,7 @@ if grep -q "^${name}:" "$__object/explorer/passwd"; then
|
|||
current_value="$(awk -F: '{ print $ENVIRON["field"] }' < "$file")"
|
||||
|
||||
if [ "$new_value" != "$current_value" ]; then
|
||||
set -- "$@" "--$property" \"$new_value\"
|
||||
set -- "$@" "--$property" \'$new_value\'
|
||||
fi
|
||||
done
|
||||
|
||||
|
@ -67,7 +67,7 @@ if grep -q "^${name}:" "$__object/explorer/passwd"; then
|
|||
else
|
||||
for property in $(ls .); do
|
||||
new_value="$(cat "$property")"
|
||||
set -- "$@" "--$property" \"$new_value\"
|
||||
set -- "$@" "--$property" \'$new_value\'
|
||||
done
|
||||
|
||||
echo useradd "$@" "$name"
|
||||
|
|
Loading…
Reference in a new issue