From d2d35bc8dbbf850bef0f0fb435e197c32e14f07e Mon Sep 17 00:00:00 2001 From: timvisee Date: Thu, 24 Jun 2021 19:04:59 +0200 Subject: [PATCH] Quiet cryptsetup when opening a Tomb with -q provided --- tomb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tomb b/tomb index ee6c8d1..0618ed3 100755 --- a/tomb +++ b/tomb @@ -1287,7 +1287,11 @@ ask_key_password() { # call cryptsetup with arguments using the currently known secret # echo flags eliminate newline and disable escape (BSD_ECHO) _cryptsetup() { - print -R -n - "$TOMBSECRET" | _sudo cryptsetup --type luks1 --key-file - ${@} + if option_is_set -q; then + print -R -n - "$TOMBSECRET" | _sudo cryptsetup --type luks1 --key-file - ${@} 2> /dev/null + else + print -R -n - "$TOMBSECRET" | _sudo cryptsetup --type luks1 --key-file - ${@} + fi return $? }