author | ft |
Mon, 28 Jul 2014 15:27:10 +0200 | |
changeset 15 | f6fc3ab7f0c9 |
permissions | -rwxr-xr-x |
ft@15 | 1 |
#!/bin/sh |
ft@15 | 2 |
|
ft@15 | 3 |
DEVICE="$1" |
ft@15 | 4 |
|
ft@15 | 5 |
# This script makes sure that the stick is unmounted and unused |
ft@15 | 6 |
# Run this Script before the init process |
ft@15 | 7 |
|
ft@15 | 8 |
# make sure the device is not mounted |
ft@15 | 9 |
umount /var/run/usbmount/* |
ft@15 | 10 |
rmdir /var/run/usbmount/* |
ft@15 | 11 |
sleep 1 |
ft@15 | 12 |
umount ${DEVICE}* |
ft@15 | 13 |
|
ft@15 | 14 |
# search for already encrypted volumes |
ft@15 | 15 |
device=$(encryptionprovider.py -g) |
ft@15 | 16 |
|
ft@15 | 17 |
if [ "$?" == "0" ] |
ft@15 | 18 |
then |
ft@15 | 19 |
encryptionprovider.py -u $device |
ft@15 | 20 |
fi |