mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 19:08:26 -06:00
Linux: Better Linux desktop integration. Add mount.veracrypt script for fstab (proposed by unit193 at https://github.com/veracrypt/VeraCrypt/issues/814)
This commit is contained in:
23
src/Setup/Linux/mount.veracrypt
Normal file
23
src/Setup/Linux/mount.veracrypt
Normal file
@@ -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}
|
||||
@@ -1,10 +1,11 @@
|
||||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=VeraCrypt
|
||||
GenericName=VeraCrypt
|
||||
Comment=VeraCrypt
|
||||
Exec=/usr/bin/veracrypt
|
||||
Icon=veracrypt
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Encryption;Encryption Tools;Utility;
|
||||
Name=VeraCrypt
|
||||
GenericName=VeraCrypt volume manager
|
||||
Comment=Create and mount VeraCrypt encrypted volumes
|
||||
Icon=veracrypt
|
||||
Exec=/usr/bin/veracrypt %f
|
||||
Categories=Security;Utility;Filesystem
|
||||
Keywords=encryption,filesystem
|
||||
Terminal=false
|
||||
MimeType=application/x-veracrypt-volume;application/x-truecrypt-volume;
|
||||
Reference in New Issue
Block a user