aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2021-07-15 08:59:40 +0200
committerMattias Andrée <maandree@kth.se>2021-07-15 08:59:40 +0200
commit1ecf724ca51550b8149b1bde59f9022db61b8fc2 (patch)
treea9edfe6627ef63a116676ca3e228b18047a53f67
parentm (diff)
downloaddotfiles-1ecf724ca51550b8149b1bde59f9022db61b8fc2.tar.gz
dotfiles-1ecf724ca51550b8149b1bde59f9022db61b8fc2.tar.bz2
dotfiles-1ecf724ca51550b8149b1bde59f9022db61b8fc2.tar.xz
m
Signed-off-by: Mattias Andrée <maandree@kth.se>
-rw-r--r--bash/aliases-Zenith3
1 files changed, 2 insertions, 1 deletions
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}"
'