truecrypt_scripts/truecrypt_getdevices.sh
author ft
Tue, 09 Sep 2014 09:19:17 +0200
changeset 25 25581dcb9e62
parent 0 35acc83f4749
child 27 a8c8d86b8501
permissions -rwxr-xr-x
changed information notifications (no popup anymore)
     1 #!/bin/sh
     2 
     3 BASEDIR="$(dirname $0)"
     4 
     5 if [ -r "$BASEDIR/truecrypt_config.cfg" ]
     6 then
     7 	. "$BASEDIR/truecrypt_config.cfg"
     8 else
     9 	echo "truecrypt_config.cfg not found" >&2
    10 	exit 1
    11 fi
    12 
    13 devicelist="$($tc_cmd -l)"
    14 result="$?"
    15 
    16 if [ "$result" != "0" ]
    17 then
    18 	exit 1
    19 fi
    20 
    21 # can't do this on the original command because of /bin/sh -> dash -> no PIPESTATUS -.-
    22 devicelist=$(echo $devicelist | awk '{ print $2}')
    23 
    24 echo "$devicelist"
    25 exit 0