safer quoting

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2011-08-02 15:20:32 +02:00
parent c631a609ed
commit e978542381

View file

@ -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"