author | ft |
Tue, 04 Nov 2014 14:23:14 +0100 | |
changeset 27 | a8c8d86b8501 |
parent 1 | ad15a8882cac |
permissions | -rwxr-xr-x |
ft@1 | 1 |
#!/bin/sh |
ft@1 | 2 |
|
ft@27 | 3 |
# ------------------------------------------------------------ |
ft@27 | 4 |
# opensecurity package file |
ft@27 | 5 |
# |
ft@27 | 6 |
# Autor: X-Net Services GmbH <office@x-net.at> |
ft@27 | 7 |
# |
ft@27 | 8 |
# Copyright 2013-2014 X-Net and AIT Austrian Institute of Technology |
ft@27 | 9 |
# |
ft@27 | 10 |
# |
ft@27 | 11 |
# X-Net Technologies GmbH |
ft@27 | 12 |
# Elisabethstrasse 1 |
ft@27 | 13 |
# 4020 Linz |
ft@27 | 14 |
# AUSTRIA |
ft@27 | 15 |
# https://www.x-net.at |
ft@27 | 16 |
# |
ft@27 | 17 |
# AIT Austrian Institute of Technology |
ft@27 | 18 |
# Donau City Strasse 1 |
ft@27 | 19 |
# 1220 Wien |
ft@27 | 20 |
# AUSTRIA |
ft@27 | 21 |
# http://www.ait.ac.at |
ft@27 | 22 |
# |
ft@27 | 23 |
# |
ft@27 | 24 |
# Licensed under the Apache License, Version 2.0 (the "License"); |
ft@27 | 25 |
# you may not use this file except in compliance with the License. |
ft@27 | 26 |
# You may obtain a copy of the License at |
ft@27 | 27 |
# |
ft@27 | 28 |
# http://www.apache.org/licenses/LICENSE-2.0 |
ft@27 | 29 |
# |
ft@27 | 30 |
# Unless required by applicable law or agreed to in writing, software |
ft@27 | 31 |
# distributed under the License is distributed on an "AS IS" BASIS, |
ft@27 | 32 |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
ft@27 | 33 |
# See the License for the specific language governing permissions and |
ft@27 | 34 |
# limitations under the License. |
ft@27 | 35 |
# ------------------------------------------------------------ |
ft@27 | 36 |
|
ft@1 | 37 |
BASEDIR="$(dirname $0)" |
ft@1 | 38 |
DEVICE="$1" |
ft@1 | 39 |
|
ft@1 | 40 |
if [ -r "$BASEDIR/truecrypt_config.cfg" ] |
ft@1 | 41 |
then |
ft@1 | 42 |
. "$BASEDIR/truecrypt_config.cfg" |
ft@1 | 43 |
else |
ft@1 | 44 |
echo "truecrypt_config.cfg not found" >&2 |
ft@1 | 45 |
exit 1 |
ft@1 | 46 |
fi |
ft@1 | 47 |
|
ft@1 | 48 |
message="$($tc_cmd -d $DEVICE)" |
ft@1 | 49 |
result="$?" |
ft@1 | 50 |
|
ft@1 | 51 |
if [ "$result" != "0" ] |
ft@1 | 52 |
then |
ft@1 | 53 |
exit 1 |
ft@1 | 54 |
fi |
ft@1 | 55 |
|
ft@1 | 56 |
echo "$message" |
ft@1 | 57 |
exit 0 |