slaprunner: sha256sum don't work with quotation marks
Showing
-
Owner
Nice catch, although this is not the best fix: it just brings back the bug that any space (and weird char) in any path will break this script.
This would seem better, but I did not test it:
find -path "./runner/instance/slappart*/srv/backup/*" -type f -print0 | xargs -0 sha256sum | sort -k 66 > "$tmp_backup_sum" test -s "$tmp_backup_sum" || exit 0
This also takes care of maximum argument length.
[EDIT] "test -s ... ||" was intended, but I wrote "test -z .. &&"
-
Owner
How can this change fix anything ? Quotation marks are only a shell syntax to delimit tokens. They aren't passed in the arguments of sha256sum.
-
Owner
@jm :
$backup_directory_path
contains many paths. -
Owner
@vpelletier I will check your recommendation when I return to the topic.
-
Owner
@vpelletier arg, I was too blinded by the incorrect commit subject.
Anyway, I'd rather focus on rewriting more in Python.
Please register or sign in to comment