Commit 0093020b authored by Joanne Hugé's avatar Joanne Hugé

playbook/upgrader: set locale so that sort behaves the same between cron and command line

parent 91c9d4a7
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
chdir: /opt/upgrader/tmp chdir: /opt/upgrader/tmp
- name: Check uncompressed archive sha256sum - name: Check uncompressed archive sha256sum
shell: cd /opt/upgrader/tmp && find . -type f ! -name 'sha256sum' -print0 | sort -z | xargs -0 sha256sum | sha256sum --check sha256sum shell: cd /opt/upgrader/tmp && find . -type f ! -name 'sha256sum' -print0 | LC_ALL=C sort -z | xargs -0 sha256sum | sha256sum --check sha256sum
register: playbook_sha256sum register: playbook_sha256sum
- shell: cp -R /opt/upgrader/tmp /opt/upgrader/playbook - shell: cp -R /opt/upgrader/tmp /opt/upgrader/playbook
......
...@@ -3,5 +3,5 @@ conf=${1:-/etc/opt/slapcache.cfg} ...@@ -3,5 +3,5 @@ conf=${1:-/etc/opt/slapcache.cfg}
conf=$(realpath $conf) conf=$(realpath $conf)
cd $playbook_dir cd $playbook_dir
find . -type f ! -name 'sha256sum' -print0 | sort -z | xargs -0 sha256sum | sha256sum > sha256sum find . -type f ! -name 'sha256sum' -print0 | LC_ALL=C sort -z | xargs -0 sha256sum | sha256sum > sha256sum
rm -f /tmp/archive.tar.gz && tar -czvf /tmp/archive.tar.gz . && slapcache-upload --file=/tmp/archive.tar.gz --slapos-configuration=$conf rm -f /tmp/archive.tar.gz && tar -czvf /tmp/archive.tar.gz . && slapcache-upload --file=/tmp/archive.tar.gz --slapos-configuration=$conf
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment