truecrypt_scripts/truecrypt_umount.sh
author ft
Tue, 09 Sep 2014 09:19:17 +0200
changeset 25 25581dcb9e62
child 27 a8c8d86b8501
permissions -rwxr-xr-x
changed information notifications (no popup anymore)
ft@1
     1
#!/bin/sh
ft@1
     2
ft@1
     3
BASEDIR="$(dirname $0)"
ft@1
     4
DEVICE="$1"
ft@1
     5
ft@1
     6
if [ -r "$BASEDIR/truecrypt_config.cfg" ]
ft@1
     7
then
ft@1
     8
	. "$BASEDIR/truecrypt_config.cfg"
ft@1
     9
else
ft@1
    10
	echo "truecrypt_config.cfg not found" >&2
ft@1
    11
	exit 1
ft@1
    12
fi
ft@1
    13
ft@1
    14
message="$($tc_cmd -d $DEVICE)"
ft@1
    15
result="$?"
ft@1
    16
ft@1
    17
if [ "$result" != "0" ]
ft@1
    18
then
ft@1
    19
	exit 1
ft@1
    20
fi
ft@1
    21
ft@1
    22
echo "$message"
ft@1
    23
exit 0