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