diff options
Diffstat (limited to 'src/Setup/Linux')
-rwxr-xr-x | src/Setup/Linux/mount.veracrypt | 23 | ||||
-rw-r--r-- | src/Setup/Linux/veracrypt-uninstall.sh | 9 | ||||
-rw-r--r-- | src/Setup/Linux/veracrypt.desktop | 13 | ||||
-rw-r--r-- | src/Setup/Linux/veracrypt.xml | 11 | ||||
-rw-r--r-- | src/Setup/Linux/veracrypt_install_template.sh | 15 |
5 files changed, 56 insertions, 15 deletions
diff --git a/src/Setup/Linux/mount.veracrypt b/src/Setup/Linux/mount.veracrypt new file mode 100755 index 00000000..a891c253 --- /dev/null +++ b/src/Setup/Linux/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 --text --non-interactive ${VCOPTIONS[*]} --fs-options="${OPTIONS%,*}" ${DEV} ${MNTPT} diff --git a/src/Setup/Linux/veracrypt-uninstall.sh b/src/Setup/Linux/veracrypt-uninstall.sh index 82ea3096..2abbfd6c 100644 --- a/src/Setup/Linux/veracrypt-uninstall.sh +++ b/src/Setup/Linux/veracrypt-uninstall.sh @@ -1,13 +1,14 @@ #!/bin/sh V="$(mount | grep veracrypt_aux_mnt)" -[ "$V" ] && echo Error: All volumes must be dismounted first. && exit 1 +[ "$V" ] && echo Error: All volumes must be dismounted first. >&2 && exit 1 rm -f /usr/bin/veracrypt -rm -f /usr/share/veracrypt/doc/License.txt -rm -f '/usr/share/veracrypt/doc/VeraCrypt User Guide.pdf' +rm -f /usr/sbin/mount.veracrypt rm -f /usr/share/applications/veracrypt.desktop rm -f /usr/share/pixmaps/veracrypt.xpm -rmdir /usr/share/veracrypt/doc /usr/share/veracrypt +rm -f /usr/share/mime/packages/veracrypt.xml +rm -fr /usr/share/veracrypt +rm -fr /usr/share/doc/veracrypt echo VeraCrypt uninstalled. rm -f /usr/bin/veracrypt-uninstall.sh diff --git a/src/Setup/Linux/veracrypt.desktop b/src/Setup/Linux/veracrypt.desktop index 01dfaf61..4504f20c 100644 --- a/src/Setup/Linux/veracrypt.desktop +++ b/src/Setup/Linux/veracrypt.desktop @@ -1,10 +1,11 @@ [Desktop Entry] -Encoding=UTF-8 +Type=Application Name=VeraCrypt -GenericName=VeraCrypt -Comment=VeraCrypt -Exec=/usr/bin/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 -Type=Application -Categories=Encryption;Encryption Tools;Utility; +MimeType=application/x-veracrypt-volume;application/x-truecrypt-volume;
\ No newline at end of file diff --git a/src/Setup/Linux/veracrypt.xml b/src/Setup/Linux/veracrypt.xml new file mode 100644 index 00000000..4fc73b90 --- /dev/null +++ b/src/Setup/Linux/veracrypt.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'> + <mime-type type="application/x-veracrypt-volume"> + <comment>VeraCrypt Volume</comment> + <glob pattern="*.hc"/> + </mime-type> + <mime-type type="application/x-truecrypt-volume"> + <comment>TrueCrypt Volume</comment> + <glob pattern="*.tc"/> + </mime-type> +</mime-info> diff --git a/src/Setup/Linux/veracrypt_install_template.sh b/src/Setup/Linux/veracrypt_install_template.sh index 8eaf15c8..e4615966 100644 --- a/src/Setup/Linux/veracrypt_install_template.sh +++ b/src/Setup/Linux/veracrypt_install_template.sh @@ -3,9 +3,9 @@ # Copyright (c) 2008-2012 TrueCrypt Developers Association and which is governed # by the TrueCrypt License 3.0. # # Modifications and additions to the original source code (contained in this file) -# and all other portions of this file are Copyright (c) 2013-2016 IDRIX +# and all other portions of this file are Copyright (c) 2013-2017 IDRIX # and are governed by the Apache License 2.0 the full text of which is # contained in the file License.txt included in VeraCrypt binary and source # code distribution packages. # @@ -31,9 +31,13 @@ KTERM=0 case $PACKAGE_TYPE in tar) PACKAGE_INSTALLER=tar - PACKAGE_INSTALLER_OPTS='-C / --no-overwrite-dir -xpzvf' + if tar --help | grep -q -- '--keep-directory-symlink'; then + PACKAGE_INSTALLER_OPTS='-C / --keep-directory-symlink --no-overwrite-dir -xpzvf' + else + PACKAGE_INSTALLER_OPTS='-C / --no-overwrite-dir -xpzvf' + fi ;; esac @@ -92,9 +96,9 @@ show_message() gnome-terminal --title='VeraCrypt Setup' -e "sh -c \"echo $*; read A\"" else if [ $KTERM -eq 1 ] then - konsole --title 'VeraCrypt Setup' --caption 'VeraCrypt Setup' -e sh -c "echo $*; read A" + konsole --qwindowtitle 'VeraCrypt Setup' -e sh -c "echo $*; read A" fi fi fi fi @@ -1030,16 +1034,17 @@ fi # Package installation if [ "$PACKAGE_TYPE" = "tar" ] then - if ! which fusermount >/dev/null 2>/dev/null || ! which dmsetup >/dev/null 2>/dev/null + if ! which fusermount >/dev/null 2>/dev/null || ! which dmsetup >/dev/null 2>/dev/null || ! service pcscd status >/dev/null 2>/dev/null then show_message "$(cat <<_INFO Requirements for Running VeraCrypt: ----------------------------------- - FUSE library and tools - device mapper tools + - PC/SC Lite (optional) _INFO )" [ $GUI -eq 0 ] && echo && echo Press Enter to continue... && read A @@ -1072,9 +1077,9 @@ then exec gnome-terminal --title='VeraCrypt Setup' -e "sh -c \"echo Installing package...; $SUDO $PACKAGE_INSTALLER $PACKAGE_INSTALLER_OPTS $PACKAGE; rm -f $PACKAGE; echo; echo Press Enter to exit...; read A\"" else if [ $KTERM -eq 1 ] then - exec konsole --title 'VeraCrypt Setup' --caption 'VeraCrypt Setup' -e sh -c "echo Installing package...; $SUDO $PACKAGE_INSTALLER $PACKAGE_INSTALLER_OPTS $PACKAGE; rm -f $PACKAGE; echo; echo Press Enter to exit...; read A" + exec konsole --qwindowtitle 'VeraCrypt Setup' -e sh -c "echo Installing package...; $SUDO $PACKAGE_INSTALLER $PACKAGE_INSTALLER_OPTS $PACKAGE; rm -f $PACKAGE; echo; echo Press Enter to exit...; read A" fi fi fi else |