commit 01452577fca9d68410c93fbcd3620853b5618dc2 from: Matthias via: thexhr date: Mon Oct 05 09:49:20 2020 UTC tpm fails if shred is not installed Check if shred is actually installed and fall back to rm commit - 83a735d6d19843c8b09ae298f585c2cb3b12f331 commit + 01452577fca9d68410c93fbcd3620853b5618dc2 blob - d751f0f910601fbafb093c92da0b685fe9fe3baa blob + c08a8e440e2c1ed94a8165bd00db6983a5f26a63 --- tpm +++ tpm @@ -115,6 +115,10 @@ nuke_file() { if [ -n ${OSV} ]; then if [ "${OSV}" = "Linux" ]; then + if [[ -z "$(which shred 2> /dev/null)" ]]; then + echo "Cannot find shred. Using rm" + return + fi NUKE="shred -u" elif [ "${OSV}" = "OpenBSD" -o "${OSV}" = "FreeBSD" -o "${OSV}" = "DragonFly" -o "${OSV}" = "NetBSD" ]; then NUKE="rm -P"