From 1ecf724ca51550b8149b1bde59f9022db61b8fc2 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Thu, 15 Jul 2021 08:59:40 +0200 Subject: m MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- bash/aliases-Zenith | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'bash/aliases-Zenith') diff --git a/bash/aliases-Zenith b/bash/aliases-Zenith index 419de1d..73db885 100644 --- a/bash/aliases-Zenith +++ b/bash/aliases-Zenith @@ -1,10 +1,11 @@ # -*- shell-script -*- mount-crypt () { + gpg --decrypt /media/Secondary/.crypt/crypt.key | \ asroot env XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR}" CRYPT_DIR=~/Crypt sh -ec ' device="$(losetup --show -f -P /media/Secondary/.crypt/crypt.img)" printf "%s\n" "${device}" > "${XDG_RUNTIME_DIR}/CryptCrypt" - gpg --decrypt /media/Secondary/.crypt/crypt.key | cryptsetup -d - open "${device}" CryptCrypt + cryptsetup -d - open "${device}" CryptCrypt mkdir -p "${CRYPT_DIR}" mount /dev/mapper/CryptCrypt "${CRYPT_DIR}" ' -- cgit v1.2.3-70-g09d2