3 which cryptsetup >/dev/null 2>&1 && [ -n "`dmcryptmap $device`" ]
8 echo " cryptsetup (luks and dmcrypt)"
13 # Step 2: Find the crypted volume defined for this partition
21 echo "# $device: cryptsetup detected" 1>&2
23 offset="`cryptsetup luksDump $device 2>/dev/null | awk '/^Payload offset/{print $3}'`"
25 if [ -z "$offset" ]; then
33 cryptdev="`dmcryptmap $device`"
35 if [ -z "$cryptdev" ]; then
36 echo "! Failed to find decrypted mapper device for $device"
40 cryptsector="`dc -e "$sector $offset - p"`" #`"
43 echo "device $cryptdev crypt"
45 echo "sector $cryptsector"
53 register_mapper "crypt"