1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/truecrypt_scripts/truecrypt_getdevices.sh Tue Apr 08 11:39:52 2014 +0200
1.3 @@ -0,0 +1,25 @@
1.4 +#!/bin/sh
1.5 +
1.6 +BASEDIR="$(dirname $0)"
1.7 +
1.8 +if [ -r "$BASEDIR/truecrypt_config.cfg" ]
1.9 +then
1.10 + . "$BASEDIR/truecrypt_config.cfg"
1.11 +else
1.12 + echo "truecrypt_config.cfg not found" >&2
1.13 + exit 1
1.14 +fi
1.15 +
1.16 +devicelist="$($tc_cmd -l)"
1.17 +result="$?"
1.18 +
1.19 +if [ "$result" != "0" ]
1.20 +then
1.21 + exit 1
1.22 +fi
1.23 +
1.24 +# can't do this on the original command because of /bin/sh -> dash -> no PIPESTATUS -.-
1.25 +devicelist=$(echo $devicelist | awk '{ print $2}')
1.26 +
1.27 +echo "$devicelist"
1.28 +exit 0
1.29 \ No newline at end of file