summaryrefslogtreecommitdiff
path: root/bin/wrappers/cryptsetup_mount
diff options
context:
space:
mode:
authorA Farzat <a@farzat.xyz>2024-10-24 23:31:41 +0900
committerA Farzat <a@farzat.xyz>2024-11-04 23:31:41 +0900
commit7e905e33bc55d142b4fd32c28cc2be99dfdd3f0b (patch)
tree2c838df08dfb827ae4d554c576e5052ad0326fa6 /bin/wrappers/cryptsetup_mount
parentd8ae1706a62b23b6071d8f46ace9523fbbb1adac (diff)
downloaddotfiles-7e905e33bc55d142b4fd32c28cc2be99dfdd3f0b.tar.gz
dotfiles-7e905e33bc55d142b4fd32c28cc2be99dfdd3f0b.zip
Add useful wrapper scripts
Diffstat (limited to 'bin/wrappers/cryptsetup_mount')
-rwxr-xr-xbin/wrappers/cryptsetup_mount7
1 files changed, 7 insertions, 0 deletions
diff --git a/bin/wrappers/cryptsetup_mount b/bin/wrappers/cryptsetup_mount
new file mode 100755
index 0000000..e755daf
--- /dev/null
+++ b/bin/wrappers/cryptsetup_mount
@@ -0,0 +1,7 @@
+#!/usr/bin/env sh
+
+# Mounts encrypted volume into dm-crypt
+# First argument is the device name - /dev/*
+# Second argument is the directory name desired
+
+cryptsetup open "$1" "$2" && mount --mkdir "/dev/mapper/$2" "/mnt/dm-crypt/$2"