3 # ------------------------------------------------------------
4 # opensecurity package file
6 # Autor: X-Net Services GmbH <office@x-net.at>
8 # Copyright 2013-2014 X-Net and AIT Austrian Institute of Technology
11 # X-Net Technologies GmbH
15 # https://www.x-net.at
17 # AIT Austrian Institute of Technology
18 # Donau City Strasse 1
21 # http://www.ait.ac.at
24 # Licensed under the Apache License, Version 2.0 (the "License");
25 # you may not use this file except in compliance with the License.
26 # You may obtain a copy of the License at
28 # http://www.apache.org/licenses/LICENSE-2.0
30 # Unless required by applicable law or agreed to in writing, software
31 # distributed under the License is distributed on an "AS IS" BASIS,
32 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
33 # See the License for the specific language governing permissions and
34 # limitations under the License.
35 # ------------------------------------------------------------
39 # This script makes sure that the stick is unmounted and unused
40 # Run this Script before the init process
42 # make sure to have "/dev/sdb" (not "/dev/sdb1")
43 #DEVICE="${DEVICE:0:8}" the bash way does not work in dash -.-
44 DEVICE="$(echo "$DEVICE" | awk '{print substr($1,0,9)}')"
46 # make sure the device is not mounted
47 chattr -i "/tmp/usbmount"
48 umount /tmp/usbmount/*
53 # search for already encrypted volumes
54 device=$(encryptionprovider.py -g)
58 encryptionprovider.py -u $device