From 51d3c568423e82d59ee5a3da755cb8ccdda2a095 Mon Sep 17 00:00:00 2001 From: Kristian Schuster Date: Sun, 29 Sep 2019 17:44:15 +0200 Subject: [PATCH] crypto-test: suppress errors when devs are not accessible for cryptsetup --- include/tests_crypto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/tests_crypto b/include/tests_crypto index b5f3c7be..77be22f2 100644 --- a/include/tests_crypto +++ b/include/tests_crypto @@ -140,7 +140,7 @@ # cryptsetup only works as root if [ -n "${LSBLKBINARY}" -a -n "${CRYPTSETUPBINARY}" -a ${FORENSICS_MODE} -eq 0 ]; then for BLOCK_DEV in $(${LSBLKBINARY} --noheadings --list --paths -o NAME); do - if ${CRYPTSETUPBINARY} isLuks ${BLOCK_DEV}; then + if ${CRYPTSETUPBINARY} isLuks ${BLOCK_DEV} 2> /dev/null; then LogText "Result: Found LUKS encrypted block device: ${BLOCK_DEV}" Report "encryption[]=luks,block_device,${BLOCK_DEV}" FOUND=$((FOUND +1))