summaryrefslogtreecommitdiff
path: root/veracrypt/debian/scripts/mount.veracrypt
diff options
context:
space:
mode:
authorB Stack <bgstack15@gmail.com>2020-05-27 12:50:09 +0000
committerB Stack <bgstack15@gmail.com>2020-05-27 12:50:09 +0000
commit61ccb58a66b70e9260316d37d6df91decdafa4b8 (patch)
tree700b854fe9c5e2e9dd74d7900a7cd8639e6836d4 /veracrypt/debian/scripts/mount.veracrypt
parentpm: add pm-fedora to spec (diff)
parentfix typos (diff)
downloadstackrpms-61ccb58a66b70e9260316d37d6df91decdafa4b8.tar.gz
stackrpms-61ccb58a66b70e9260316d37d6df91decdafa4b8.tar.bz2
stackrpms-61ccb58a66b70e9260316d37d6df91decdafa4b8.zip
Merge branch 'veracrypt-bump' into 'master'
Rebase Veracrypt as an overlay of unit193 Closes #22 See merge request bgstack15/stackrpms!159
Diffstat (limited to 'veracrypt/debian/scripts/mount.veracrypt')
-rwxr-xr-xveracrypt/debian/scripts/mount.veracrypt23
1 files changed, 23 insertions, 0 deletions
diff --git a/veracrypt/debian/scripts/mount.veracrypt b/veracrypt/debian/scripts/mount.veracrypt
new file mode 100755
index 0000000..499ad9b
--- /dev/null
+++ b/veracrypt/debian/scripts/mount.veracrypt
@@ -0,0 +1,23 @@
+#!/bin/bash
+DEV="$1"
+MNTPT="$2"
+VCOPTIONS=""
+OPTIONS=""
+
+shift 3
+IFS=','
+for arg in $*; do
+ case "$arg" in
+ truecrypt) VCOPTIONS=(${VCOPTIONS[*]} --truecrypt);;
+ system) VCOPTIONS=(${VCOPTIONS[*]} --mount-options=system);;
+ fs=*) VCOPTIONS=(${VCOPTIONS[*]} --filesystem=${arg#*=});;
+ keyfiles=*) VCOPTIONS=(${VCOPTIONS[*]} --keyfiles=${arg#*=});;
+ password=*) VCOPTIONS=(${VCOPTIONS[*]} --password=${arg#*=});;
+ pim=*) VCOPTIONS=(${VCOPTIONS[*]} --pim==${arg#*=});;
+ protect-hidden=*) VCOPTIONS=(${VCOPTIONS[*]} --protect-hidden=${arg#*=});;
+ slot=*) VCOPTIONS=(${VCOPTIONS[*]} --slot=${arg#*=});;
+ *) OPTIONS="${OPTIONS}${arg},";;
+ esac
+done
+
+/usr/bin/veracrypt --non-interactive --text ${VCOPTIONS[*]} --fs-options="${OPTIONS%,*}" ${DEV} ${MNTPT}
bgstack15