mirror of
https://gitlab.com/cryptsetup/cryptsetup.git
synced 2025-12-15 21:00:05 +01:00
Seems that dmsetup table is broken in recent lvm2, let's support "x: table" as well.
git-svn-id: https://cryptsetup.googlecode.com/svn/trunk@551 36d66b0a-2a48-0410-832c-cd162a569da5
This commit is contained in:
@@ -51,7 +51,7 @@ add_device() {
|
||||
|
||||
dmcrypt_check() # device outstring
|
||||
{
|
||||
X=$(dmsetup table $1 2>/dev/null | cut -d' ' -f 4)
|
||||
X=$(dmsetup table $1 2>/dev/null | sed 's/.*: //' | cut -d' ' -f 4)
|
||||
if [ $X = $2 ] ; then
|
||||
echo -n "[table OK]"
|
||||
else
|
||||
|
||||
@@ -63,7 +63,7 @@ crypt_key() # hash keysize pwd/file name outkey [limit]
|
||||
fi
|
||||
fi
|
||||
|
||||
VKEY=$(dmsetup table $DEV2 --showkeys 2>/dev/null | cut -d' ' -f 5)
|
||||
VKEY=$(dmsetup table $DEV2 --showkeys 2>/dev/null | sed 's/.*: //' | cut -d' ' -f 5)
|
||||
if [ "$VKEY" != "$5" ] ; then
|
||||
echo " [FAILED]"
|
||||
echo "expected: $5"
|
||||
|
||||
Reference in New Issue
Block a user