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:
Milan Broz
2011-06-13 16:45:09 +00:00
parent a5757c35f0
commit 96d67485d9
2 changed files with 2 additions and 2 deletions

View File

@@ -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

View File

@@ -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"