Commit ebf4e722 authored by Vincent Pelletier's avatar Vincent Pelletier Committed by Rafael Monnerat

software/slaprunner: Change directory in a subshell.

More similar changes will come later as part of larger changes.
Also, fail if
  cd "$backup_directory"
fails, as it is supposed to exist by that point.
parent 7d522b2b
...@@ -31,7 +31,7 @@ md5sum = 9db9957f452bda370cb2d5cc2e833e85 ...@@ -31,7 +31,7 @@ md5sum = 9db9957f452bda370cb2d5cc2e833e85
[template-runner-export-script] [template-runner-export-script]
filename = template/runner-export.sh.jinja2 filename = template/runner-export.sh.jinja2
md5sum = c4e78e85235fd7340029b26c54f4992f md5sum = 5cc9829a25d129740158e97c9899bbfa
[instance-runner-export] [instance-runner-export]
filename = instance-runner-export.cfg.in filename = instance-runner-export.cfg.in
......
...@@ -63,7 +63,10 @@ if [ -d {{ directory['backup'] }}/runner/software ]; then ...@@ -63,7 +63,10 @@ if [ -d {{ directory['backup'] }}/runner/software ]; then
rm {{ directory['backup'] }}/runner/software/* rm {{ directory['backup'] }}/runner/software/*
fi fi
cd {{ directory['backup'] }} && find -type f ! -name backup.signature -print0 | xargs -0 sha256sum | LC_ALL=C sort -k 66 > backup.signature (
cd "$backup_directory"
find -type f ! -name backup.signature -print0 | xargs -0 sha256sum | LC_ALL=C sort -k 66 > backup.signature
)
# Check that export didn't happen during backup of instances # Check that export didn't happen during backup of instances
tmp_backup_sum=$(mktemp -p "$tmp_directory") tmp_backup_sum=$(mktemp -p "$tmp_directory")
......
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