Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/CISOfy/lynis.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve8291 <hambling8@gmail.com>2020-06-21 17:47:28 +0300
committerGitHub <noreply@github.com>2020-06-21 17:47:28 +0300
commitc02ce49ce336abb146afc18d262bc7aab5365dc3 (patch)
treed59dfe3bd4aabf5127d2d8a068a1cd2741346875 /include/tests_crypto
parent74c4298eab7ce660c896721c064218f66f563c83 (diff)
fix stderr output from cryptsetup status
Redirected stderr to /dev/null to silence output of `cryptsetup status /swap.img` This was causing error output from my cron script. Otherwise, if the swap file is not encrypted then the following error will be printed: `Device swap.img not found`
Diffstat (limited to 'include/tests_crypto')
-rw-r--r--include/tests_crypto2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/tests_crypto b/include/tests_crypto
index 02fa0a80..ddf1406a 100644
--- a/include/tests_crypto
+++ b/include/tests_crypto
@@ -186,7 +186,7 @@
if ${CRYPTSETUPBINARY} isLuks "${BLOCK_DEV}" 2> /dev/null; then
LogText "Result: Found LUKS encrypted swap device: ${BLOCK_DEV}"
ENCRYPTED_SWAPS=$((ENCRYPTED_SWAPS +1))
- elif ${CRYPTSETUPBINARY} status "${BLOCK_DEV}" | ${GREPBINARY} --quiet "cipher:"; then
+ elif ${CRYPTSETUPBINARY} status "${BLOCK_DEV}" 2> /dev/null | ${GREPBINARY} --quiet "cipher:"; then
LogText "Result: Found non-LUKS encrypted swap device: ${BLOCK_DEV}"
ENCRYPTED_SWAPS=$((ENCRYPTED_SWAPS +1))
else