From 87027d6a883c25e8a43ad2ac4dcf7b011228db11 Mon Sep 17 00:00:00 2001 From: Thierry Laurion Date: Thu, 12 Jan 2023 18:04:27 -0500 Subject: [PATCH] recovery call: since we operate under set -e, make sure that shred failing doesn't exit --- initrd/etc/functions | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/initrd/etc/functions b/initrd/etc/functions index 8062c20b..75b6bfe3 100755 --- a/initrd/etc/functions +++ b/initrd/etc/functions @@ -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