Inhalt nur in Englisch verfügbar

Encrypted DVDs - mount / umount toggle script

Keywords: truecrypt
Versions:

This script is designed to handle .tc files (I use this extension for truecrypt volumes) from konqueror. One double click mounts, the next unmounts. It only supports volumes that only use a key file and no additional password.

On encrypted DVDs the mount point must already exist. Also the dvd.key needs to reside on a encrypted volume itself for obvious reasons.

#!/bin/bash

vaultfile=$(readlink -f $1)
vaultdir=$(echo $vaultfile | rev | cut --complement -d. -f1 | rev)

if [ $vaultfile == $vaultdir ]; then
        echo "Mount point and file identical. Aborting."
        exit
fi

mappingname=$(mount | grep $vaultdir | cut -d\  -f1)

if [ -z $mappingname ]; then

        if [ ! -e $vaultdir ]; then
                echo "Creating mount point $vaultdir..."
                mkdir $vaultdir
        fi

        echo "Mounting $vaultfile..."
        truecrypt -k ~/.truecrypt/dvd.key -u $vaultfile $vaultdir

else

        echo "Unmounting $vaultfile..."
        truecrypt -d $mappingname

fi

Related notes for 'truecrypt':
Encrypted DVDs

Kommentare
Neuen Kommentar eingeben:

Der Kommentar wird nur gespeichert, wenn folgende Frage richtig beantwortet wird:
Wieviele Zwerge gibt es in Schneewitchen und die sieben Zwerge?

Lösung:
Name:
URL:
(Liebe Individual-Spammer: Die URL wird erst nach meiner Freigabe verlinkt und die kriegt ihr nicht.)
Kommentar: