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")"
|
current_value="$(awk -F: '{ print $ENVIRON["field"] }' < "$file")"
|
||||||
|
|
||||||
if [ "$new_value" != "$current_value" ]; then
|
if [ "$new_value" != "$current_value" ]; then
|
||||||
set -- "$@" "--$property" \"$new_value\"
|
set -- "$@" "--$property" \'$new_value\'
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ if grep -q "^${name}:" "$__object/explorer/passwd"; then
|
||||||
else
|
else
|
||||||
for property in $(ls .); do
|
for property in $(ls .); do
|
||||||
new_value="$(cat "$property")"
|
new_value="$(cat "$property")"
|
||||||
set -- "$@" "--$property" \"$new_value\"
|
set -- "$@" "--$property" \'$new_value\'
|
||||||
done
|
done
|
||||||
|
|
||||||
echo useradd "$@" "$name"
|
echo useradd "$@" "$name"
|
||||||
|
|
Loading…
Reference in a new issue