5 # This script makes sure that the stick is unmounted and unused
6 # Run this Script before the init process
8 # make sure to have "/dev/sdb" (not "/dev/sdb1")
9 #DEVICE="${DEVICE:0:8}" the bash way does not work in dash -.-
10 DEVICE="$(echo "$DEVICE" | awk '{print substr($1,0,9)}')"
12 # make sure the device is not mounted
13 umount /var/run/usbmount/*
15 rmdir /var/run/usbmount/*
18 # search for already encrypted volumes
19 device=$(encryptionprovider.py -g)
23 encryptionprovider.py -u $device