recovery call: since we operate under set -e, make sure that shred failing doesn't exit

This commit is contained in:
Thierry Laurion 2023-01-12 18:04:27 -05:00
parent 8e73d91121
commit 87027d6a88
No known key found for this signature in database
GPG Key ID: E7B4A71658E36A93

View File

@ -17,7 +17,9 @@ recovery() {
# Remove any temporary secret files that might be hanging around
# but recreate the directory so that new tools can use it.
shred -n 10 -z -u /tmp/secret/* 2> /dev/null
#safe to always be true. Otherwise "set -e" would make it exit here
shred -n 10 -z -u /tmp/secret/* 2> /dev/null || true
rm -rf /tmp/secret
mkdir -p /tmp/secret