truecrypt_scripts/truecrypt_umount.sh
changeset 1 ad15a8882cac
child 27 a8c8d86b8501
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/truecrypt_scripts/truecrypt_umount.sh	Tue Apr 08 11:39:52 2014 +0200
     1.3 @@ -0,0 +1,23 @@
     1.4 +#!/bin/sh
     1.5 +
     1.6 +BASEDIR="$(dirname $0)"
     1.7 +DEVICE="$1"
     1.8 +
     1.9 +if [ -r "$BASEDIR/truecrypt_config.cfg" ]
    1.10 +then
    1.11 +	. "$BASEDIR/truecrypt_config.cfg"
    1.12 +else
    1.13 +	echo "truecrypt_config.cfg not found" >&2
    1.14 +	exit 1
    1.15 +fi
    1.16 +
    1.17 +message="$($tc_cmd -d $DEVICE)"
    1.18 +result="$?"
    1.19 +
    1.20 +if [ "$result" != "0" ]
    1.21 +then
    1.22 +	exit 1
    1.23 +fi
    1.24 +
    1.25 +echo "$message"
    1.26 +exit 0
    1.27 \ No newline at end of file