to be run as 'root' user, I wrote two simple mount/umount scripts below and stuck them in /usr/local/bin . The umount script also kills the BitLockerAnywhere prog.
This handles multiple BitLocker mount-points..
# ===================
mount_encrypted_drive.sh
#!/bin/sh
sync
/usr/local/bin/bitlocker-anywhere/bin/run.sh
sync
# ================
umount_encrypted_drive.sh
#!/bin/sh
bl_drives=$(ls -al /mnt/BitLockerAnywhere/ | grep " sd" | awk '{print $NF}' | tr '\n' ' ')
#echo "bl_drives = $bl_drives"
for bl_drive in $bl_drives ; do
# echo "bl_drive = $bl_drive"
if mount | grep "$bl_drive" >& /dev/null ; then
echo "umounting: $bl_drive"
umount /mnt/BitLockerAnywhere/$bl_drive
sync
sleep 1
umount /mnt/BitLockerAnywhere/.${bl_drive}-raw
fi
done
sync
if [ 1 ] ; then
while true ; do
x=$(ps axh | grep "/BitLockerAnywhere" | grep -v "grep " ) ; x=$(echo $x) ; x=${x%% *} ; [ -n "$x" ] && kill -9 $x
[ -z "$x" ] && break
done
fi
sync
This handles multiple BitLocker mount-points..
# ===================
mount_encrypted_drive.sh
#!/bin/sh
sync
/usr/local/bin/bitlocker-anywhere/bin/run.sh
sync
# ================
umount_encrypted_drive.sh
#!/bin/sh
bl_drives=$(ls -al /mnt/BitLockerAnywhere/ | grep " sd" | awk '{print $NF}' | tr '\n' ' ')
#echo "bl_drives = $bl_drives"
for bl_drive in $bl_drives ; do
# echo "bl_drive = $bl_drive"
if mount | grep "$bl_drive" >& /dev/null ; then
echo "umounting: $bl_drive"
umount /mnt/BitLockerAnywhere/$bl_drive
sync
sleep 1
umount /mnt/BitLockerAnywhere/.${bl_drive}-raw
fi
done
sync
if [ 1 ] ; then
while true ; do
x=$(ps axh | grep "/BitLockerAnywhere" | grep -v "grep " ) ; x=$(echo $x) ; x=${x%% *} ; [ -n "$x" ] && kill -9 $x
[ -z "$x" ] && break
done
fi
sync