Quiet cryptsetup when opening a Tomb with -q provided

This commit is contained in:
timvisee 2021-06-24 19:04:59 +02:00 committed by Denis Roio
parent 585af6a61b
commit d2d35bc8db

4
tomb
View File

@ -1287,7 +1287,11 @@ ask_key_password() {
# call cryptsetup with arguments using the currently known secret # call cryptsetup with arguments using the currently known secret
# echo flags eliminate newline and disable escape (BSD_ECHO) # echo flags eliminate newline and disable escape (BSD_ECHO)
_cryptsetup() { _cryptsetup() {
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 - ${@} print -R -n - "$TOMBSECRET" | _sudo cryptsetup --type luks1 --key-file - ${@}
fi
return $? return $?
} }