echo "# immudex-crypt create <disk partition>";
echo "# immudex-crypt open <crypt_LUKS device>";
echo "# immudex-crypt close immudex-crypt[0-9] | ic[0-9] | [0-9]";
+ echo "LVM prep:";
+ echo "It's possible to mount EXT4 LV with your data, behind LUKS. For now";
+ echo "only open function works, so you need prepare whole LVM structure on";
+ echo "your disk or partition even with file system instalation. If there is";
+ echo "only one EXT4 LV it will be mounted automaticly, but if there is more";
+ echo "than one, you will be asked to choose which one shoud be mounted.";
}
function list() {
if [ "$mapperDeviceList" ]; then
for dmDevice in $mapperDeviceList; do
if cryptsetup status /dev/mapper/${dmDevice} > /dev/null 2>&1; then
- mountPoint=$(df --output=source,target /media/${USER}/${dmDevice} | tail -n 1 | awk '{printf $2}');
+ mountPoint=$(df --output=source,target /dev/mapper/${dmDevice} | tail -n 1 | awk '{printf $2}');
device=$(sudo cryptsetup status /dev/mapper/${dmDevice} | grep "device" | awk '{printf $2}');
if [ "$mountPoint" ] && [ "$mountPoint" != "/dev" ]; then
echo -e "$device\t /dev/mapper/${dmDevice}\t$mountPoint";
else
- echo -e "$device\t /dev/mapper/${dmDevice}\tNot mounted";
+ if $(sudo blkid | grep "${dmDevice}" | grep -q "LVM2_member"); then
+ echo -e "$device\t /dev/mapper/${dmDevice}\tNot mounted (LVM2_member)";
+ else
+ echo -e "$device\t /dev/mapper/${dmDevice}\tNot mounted";
+ fi
fi
fi
done